Skip to content

5.2.1

Compare
Choose a tag to compare
@samuelgfeller samuelgfeller released this 09 Apr 13:28
· 13 commits to master since this release

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