public function it_resolves_tenant_from_default_root_host($tenantRepository, TenantInterface $tenant)
 {
     $tenant->getId()->willReturn(1);
     $tenant->getSubdomain()->willReturn('default');
     $tenant->getName()->willReturn('default');
     $tenantRepository->findOneBySubdomain('default')->shouldBeCalled()->willReturn($tenant);
     $this->resolve('domain.com')->shouldReturn($tenant);
 }
Esempio n. 2
0
 public function it_should_get_tenant(TenantInterface $tenant)
 {
     $tenant->getId()->willReturn(1);
     $tenant->getSubdomain()->willReturn('example1');
     $tenant->getName()->willReturn('example1');
     $this->setTenant($tenant)->shouldBeNull();
     $this->getTenant()->shouldEqual($tenant);
 }