|
@@ 31-38 (lines=8) @@
|
| 28 |
|
$this->shouldImplement('SWP\Component\MultiTenancy\Context\TenantContextInterface'); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
public function it_should_set_tenant(TenantInterface $tenant) |
| 32 |
|
{ |
| 33 |
|
$tenant->getId()->willReturn(1); |
| 34 |
|
$tenant->getSubdomain()->willReturn('example1'); |
| 35 |
|
$tenant->getName()->willReturn('example1'); |
| 36 |
|
|
| 37 |
|
$this->setTenant($tenant)->shouldBeNull(); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function it_should_get_tenant(TenantInterface $tenant) |
| 41 |
|
{ |
|
@@ 40-48 (lines=9) @@
|
| 37 |
|
$this->setTenant($tenant)->shouldBeNull(); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function it_should_get_tenant(TenantInterface $tenant) |
| 41 |
|
{ |
| 42 |
|
$tenant->getId()->willReturn(1); |
| 43 |
|
$tenant->getSubdomain()->willReturn('example1'); |
| 44 |
|
$tenant->getName()->willReturn('example1'); |
| 45 |
|
|
| 46 |
|
$this->setTenant($tenant)->shouldBeNull(); |
| 47 |
|
$this->getTenant()->shouldEqual($tenant); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
public function it_should_get_empty_tenant_object() |
| 51 |
|
{ |