mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 15:54:03 +00:00
Add tests, fix bugs
This commit is contained in:
parent
3857c4a27d
commit
f05a4bca41
6 changed files with 122 additions and 16 deletions
21
tests/TenantManagerTest.php
Normal file
21
tests/TenantManagerTest.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
class TenantManagerTest extends TestCase
|
||||
{
|
||||
public $autoCreateTenant = false;
|
||||
public $autoInitTenancy = false;
|
||||
|
||||
/** @test */
|
||||
public function current_tenant_is_stored_in_the_tenant_property()
|
||||
{
|
||||
$tenant = tenant()->create('localhost');
|
||||
|
||||
tenancy()->init('localhost');
|
||||
|
||||
$this->assertSame($tenant, tenancy()->tenant);
|
||||
}
|
||||
|
||||
// todo write more tests
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue