diff --git a/tests/TenantManagerTest.php b/tests/TenantManagerTest.php index b79ef0a1..44c52ffc 100644 --- a/tests/TenantManagerTest.php +++ b/tests/TenantManagerTest.php @@ -147,7 +147,7 @@ class TenantManagerTest extends TestCase { $tenant1 = Tenant::new()->withDomains(['foo.localhost'])->save(); $tenant2 = Tenant::new()->withDomains(['bar.localhost'])->save(); - $this->assertEquals([$tenant1, $tenant2], tenancy()->all()->toArray()); + $this->assertEqualsCanonicalizing([$tenant1, $tenant2], tenancy()->all()->toArray()); } /** @test */ diff --git a/tests/TenantStorageTest.php b/tests/TenantStorageTest.php index 6959ce55..047aae7d 100644 --- a/tests/TenantStorageTest.php +++ b/tests/TenantStorageTest.php @@ -16,9 +16,9 @@ class TenantStorageTest extends TestCase { $abc = Tenant::new()->withDomains(['abc.localhost'])->save(); $exists = function () use ($abc) { - return tenancy()->all()->reduce(function ($result, $tenant) use ($abc) { - return $result ?: $tenant->id === $abc->id; - }, false); + return tenancy()->all()->contains(function ($tenant) use ($abc) { + return $tenant->id === $abc->id; + }); }; $this->assertTrue($exists());