1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:44:02 +00:00
This commit is contained in:
Samuel Štancl 2019-09-16 18:09:09 +02:00
parent 50a77ee826
commit a9c37d1535
8 changed files with 24 additions and 25 deletions

View file

@ -14,13 +14,13 @@ class TenantManagerTest extends TestCase
public $autoInitTenancy = false;
/** @test */
public function current_tenant_is_stored_in_the_tenant_property()
public function current_tenant_can_be_retrieved_using_getTenant()
{
$tenant = Tenant::new()->withDomains(['localhost'])->save();
tenancy()->init('localhost');
tenancy()->init('test.localhost');
$this->assertSame($tenant, tenancy()->tenant);
$this->assertSame($tenant, tenancy()->getTenant());
}
/** @test */