Skip to content

Commit

Permalink
Lint test
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed Mar 14, 2024
1 parent 5fccf17 commit 7a6ae66
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/Models/ItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,16 @@ public function testAuthorsWithAuthoritiesAttribute()
$data = $item->authors_with_authorities;
$this->assertCount(3, $data);

$this->assertEquals('Philips Wouwerman', $data[0]->name);
$this->assertEquals(null, $data[0]->authority);

$this->assertEquals('Boudník, Vladimír', $data[1]->name);
$this->assertInstanceOf(Authority::class, $data[1]->authority);
$this->assertEquals($authority->id, $data[1]->authority->id);

// Order of the authors is preserved
// Order of the author field is preserved
$this->assertEquals(
['Philips Wouwerman', 'Boudník, Vladimír', 'Mikuláš Galanda'],
$data->pluck('name')->toArray()
);

$this->assertEquals(null, $data[0]->authority);

$this->assertInstanceOf(Authority::class, $data[1]->authority);
$this->assertEquals($authority->id, $data[1]->authority->id);
}

protected function createFreeItem()
Expand Down

0 comments on commit 7a6ae66

Please sign in to comment.