diff --git a/eZ/Publish/API/Repository/Tests/LocationServiceTest.php b/eZ/Publish/API/Repository/Tests/LocationServiceTest.php index 4238ae4671..f92c9ab5b1 100644 --- a/eZ/Publish/API/Repository/Tests/LocationServiceTest.php +++ b/eZ/Publish/API/Repository/Tests/LocationServiceTest.php @@ -1987,19 +1987,8 @@ public function testBookmarksAreSwappedAfterSwapLocation() $afterSwap = $bookmarkService->loadBookmarks(); /* END: Use Case */ - $expectedIdsAfter = array_map(static function (Location $item) use ($demoDesignLocationId, $contactUsLocationId) { - if ($item->id === $demoDesignLocationId) { - return $contactUsLocationId; - } - - return $item->id; - }, $beforeSwap->items); - - $actualIdsAfter = array_map(static function (Location $item) use ($demoDesignLocationId, $contactUsLocationId) { - return $item->id; - }, $afterSwap->items); - - $this->assertEquals($expectedIdsAfter, $actualIdsAfter); + $this->assertEquals($contactUsLocationId, $afterSwap->items[0]->id); + $this->assertEquals($beforeSwap->items[1]->id, $afterSwap->items[1]->id); } /**