1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:14:03 +00:00

Add assertion

This commit is contained in:
Samuel Štancl 2019-10-09 18:52:44 +02:00
parent c8a6fed3c6
commit ae91c7e375

View file

@ -167,5 +167,10 @@ class TenantClassTest extends TestCase
$this->assertSame(2, $tenant->run(function () { $this->assertSame(2, $tenant->run(function () {
return \DB::table('users')->count(); return \DB::table('users')->count();
})); }));
// test that the tenant variable can be accessed
$this->assertSame($tenant->id, $tenant->run(function ($tenant) {
return $tenant->id;
}));
} }
} }