mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
Test cleanup
This commit is contained in:
parent
97d1fc87a2
commit
25927c36bd
2 changed files with 4 additions and 4 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue