From 7a6ae6626ec1464b632c51d1328daf18a1fc02ea Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Thu, 14 Mar 2024 16:33:53 +0100 Subject: [PATCH] Lint test --- tests/Models/ItemTest.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/Models/ItemTest.php b/tests/Models/ItemTest.php index 4482528e1..3267a537d 100644 --- a/tests/Models/ItemTest.php +++ b/tests/Models/ItemTest.php @@ -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()