From bc9dd78e2d81637f0340c782a41a00d81a755a19 Mon Sep 17 00:00:00 2001 From: Kovah Date: Thu, 15 Aug 2024 22:51:13 +0200 Subject: [PATCH] Correct bulk edit tests --- tests/Controller/API/BulkEditApiTest.php | 6 +++--- tests/Controller/Models/BulkEditControllerTest.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Controller/API/BulkEditApiTest.php b/tests/Controller/API/BulkEditApiTest.php index 54ea10e1..2f5b8013 100644 --- a/tests/Controller/API/BulkEditApiTest.php +++ b/tests/Controller/API/BulkEditApiTest.php @@ -49,9 +49,9 @@ public function testLinksEdit(): void array_walk($links, fn($link) => $link->refresh()); - $this->assertEqualsCanonicalizing([1, 3], $links[0]->lists()->pluck('id')->sort()->toArray()); - $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->lists()->pluck('id')->sort()->toArray()); - $this->assertEqualsCanonicalizing([3], $links[2]->lists()->pluck('id')->sort()->toArray()); + $this->assertEqualsCanonicalizing([1, 3], $links[0]->lists()->pluck('id')->toArray()); + $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->lists()->pluck('id')->toArray()); + $this->assertEqualsCanonicalizing([3], $links[2]->lists()->pluck('id')->toArray()); $this->assertEqualsCanonicalizing([1, 3], $links[0]->tags()->pluck('id')->toArray()); $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->tags()->pluck('id')->toArray()); diff --git a/tests/Controller/Models/BulkEditControllerTest.php b/tests/Controller/Models/BulkEditControllerTest.php index 0045b043..ecb05800 100644 --- a/tests/Controller/Models/BulkEditControllerTest.php +++ b/tests/Controller/Models/BulkEditControllerTest.php @@ -59,11 +59,11 @@ public function testLinksEdit(): void array_walk($links, fn($link) => $link->refresh()); - $this->assertEqualsCanonicalizing([1, 3], $links[0]->lists()->pluck('id')->sort()->toArray()); - $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->lists()->pluck('id')->sort()->toArray()); - $this->assertEqualsCanonicalizing([3], $links[2]->lists()->pluck('id')->sort()->toArray()); + $this->assertEqualsCanonicalizing([3, 1], $links[0]->lists()->pluck('id')->toArray()); + $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->lists()->pluck('id')->toArray()); + $this->assertEqualsCanonicalizing([3], $links[2]->lists()->pluck('id')->toArray()); - $this->assertEqualsCanonicalizing([1, 3], $links[0]->tags()->pluck('id')->toArray()); + $this->assertEqualsCanonicalizing([3, 1], $links[0]->tags()->pluck('id')->toArray()); $this->assertEqualsCanonicalizing([1, 2, 3], $links[1]->tags()->pluck('id')->toArray()); $this->assertEqualsCanonicalizing([3], $links[2]->tags()->pluck('id')->toArray());