mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:14:04 +00:00
Facade tests
This commit is contained in:
parent
c9903cd43c
commit
f0dd99f099
5 changed files with 20 additions and 7 deletions
|
|
@ -5,11 +5,18 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
use Tenant;
|
||||
use Tenancy;
|
||||
|
||||
class FacadeTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
public function tenant_manager_can_be_accessed_using_the_Tenant_facade()
|
||||
public function tenant_manager_can_be_accessed_using_the_Tenancy_facade()
|
||||
{
|
||||
$this->assertSame(tenancy()->getTenant(), Tenancy::getTenant());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function tenant_storage_can_be_accessed_using_the_Tenant_facade()
|
||||
{
|
||||
tenant()->put('foo', 'bar');
|
||||
Tenant::put('abc', 'xyz');
|
||||
|
|
@ -17,4 +24,10 @@ class FacadeTest extends TestCase
|
|||
$this->assertSame('bar', Tenant::get('foo'));
|
||||
$this->assertSame('xyz', Tenant::get('abc'));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function tenant_can_be_created_using_the_Tenant_facade()
|
||||
{
|
||||
$this->assertSame('bar', Tenant::create(['foo.localhost'], ['foo' => 'bar'])->foo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue