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