1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:34:03 +00:00

Test cleanup

This commit is contained in:
Samuel Štancl 2019-09-19 22:04:52 +02:00
parent 97d1fc87a2
commit 25927c36bd
2 changed files with 4 additions and 4 deletions

View file

@ -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());