Skip to content

Releases: samuelgfeller/test-traits

6.2.1

16 Sep 13:32

Choose a tag to compare

6.2.0

16 Sep 10:53

Choose a tag to compare

Changes

  • The function argument $fields in DatabaseTableTestTrait and DatabaseTableExtensionTestTrait now accepts a string $selectClause that also can be a fields array making it a non-breaking change.
    Now only the correct fields are selected where previously all were selected and the unwanted ones removed retroactively.
    Commit: Changed database fields array to selectClause

6.1.3

30 Oct 10:57

Choose a tag to compare

Changes

  • Non nullable container

6.1.2

28 Oct 17:29

Choose a tag to compare

Changes

  • Better type hinting
  • Trailing comma in multiline

6.1.1

02 May 14:49

Choose a tag to compare

Changes

  • Adapted readme documentation TOC

6.1.0

15 Apr 15:40

Choose a tag to compare

Changes

6.0.1

10 Apr 15:58

Choose a tag to compare

Fixed

6.0.0

10 Apr 15:47
e832318

Choose a tag to compare

Changes

5.2.1

09 Apr 13:28

Choose a tag to compare

Changes

  • Added argument unpacking to insertFixture
    The function can now be called the following ways:
    • Only with the default values:
      $this->insertFixture(new UserFixture());
    • Passing one set of values:
      $this->insertFixture(new UserFixture(), ['name' => 'Bob']);
    • Passing different sets of values:
      $this->insertFixture(new UserFixture(), ['name' => 'Frank'], ['name' => 'Alice']);
    • Passing different sets of values in one array:
      $this->insertFixture(new UserFixture(), [['name' => 'Frank'], ['name' => 'Alice']]);
  • Breaking change: Added support for 2d arrays for assertPartialJsonData (breaking: second parameter is no longer $response but the jsonData array to offer more flexibility)
    • If the server returns the following json: ['users' => [['id' => 1, 'name' => 'Bob'], ['id' => 2, 'name' => 'Frank']]], the assertPartialJsonData function can used as follows to assert the names:
      $this->assertPartialJsonData([['name' => 'Bob'], ['name' => 'Frank']], $this->getJsonData($response)['users']);
  • Breaking change: Renamed insertFixtures to insertDefaultFixtures to prevent confusion

5.1.2

09 Apr 08:30

Choose a tag to compare