|
@@ 41-48 (lines=8) @@
|
| 38 |
|
$this->shouldImplement('SWP\Component\MultiTenancy\Context\TenantContextInterface'); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
public function it_should_set_tenant(TenantInterface $tenant) |
| 42 |
|
{ |
| 43 |
|
$tenant->getId()->willReturn(1); |
| 44 |
|
$tenant->getSubdomain()->willReturn('example1'); |
| 45 |
|
$tenant->getName()->willReturn('example1'); |
| 46 |
|
|
| 47 |
|
$this->setTenant($tenant)->shouldBeNull(); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
public function it_should_resolve_tenant_from_request( |
| 51 |
|
$requestStack, |
|
@@ 80-88 (lines=9) @@
|
| 77 |
|
$this->getTenant()->shouldReturn($tenant); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
public function it_should_get_tenant(TenantInterface $tenant) |
| 81 |
|
{ |
| 82 |
|
$tenant->getId()->willReturn(1); |
| 83 |
|
$tenant->getSubdomain()->willReturn('example1'); |
| 84 |
|
$tenant->getName()->willReturn('example1'); |
| 85 |
|
|
| 86 |
|
$this->setTenant($tenant)->shouldBeNull(); |
| 87 |
|
$this->getTenant()->shouldEqual($tenant); |
| 88 |
|
} |
| 89 |
|
} |
| 90 |
|
|