From 5ba2f8cd540391de2633c60359227c6639813ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 2 Feb 2023 06:35:16 +0100 Subject: [PATCH] Update tests/ResourceSyncingUsingPolymorphicTest.php --- tests/ResourceSyncingUsingPolymorphicTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ResourceSyncingUsingPolymorphicTest.php b/tests/ResourceSyncingUsingPolymorphicTest.php index 76b31d7d..408fd4ef 100644 --- a/tests/ResourceSyncingUsingPolymorphicTest.php +++ b/tests/ResourceSyncingUsingPolymorphicTest.php @@ -151,10 +151,8 @@ test('resource syncing works using a single pivot table for multiple models when $tenantUser = $tenantUser->toArray(); unset($centralUser['id'], $tenantUser['id']); - // reorder global_id in $centralUser to put it at the last position so we can match the exact array - $centralUser['global_id'] = array_shift($centralUser); - - expect($tenantUser)->toBe($centralUser); + // array keys use a different order here + expect($tenantUser)->toEqualCanonicalizing($centralUser); $tenant2 = ResourceTenantUsingPolymorphic::create(['id' => 't2']); migrateCompaniesTableForTenants();