mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 22:04:04 +00:00
Update DomainTest.php
This commit is contained in:
parent
17fecf29a1
commit
117c47c1aa
1 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedOnDomainException;
|
|||
use Stancl\Tenancy\Features\UniversalRoutes;
|
||||
use Stancl\Tenancy\Middleware\InitializeTenancyByDomain;
|
||||
use Stancl\Tenancy\Resolvers\DomainTenantResolver;
|
||||
use function Symfony\Component\String\s;
|
||||
|
||||
class DomainTest extends TestCase
|
||||
{
|
||||
|
|
@ -109,11 +110,15 @@ class DomainTest extends TestCase
|
|||
/** @test */
|
||||
public function not_defining_onfail_customized_logic_throw_correct_exception_when_universal_route_feature_enabled()
|
||||
{
|
||||
$this->expectException(TenantCouldNotBeIdentifiedOnDomainException::class);
|
||||
|
||||
// un-define onFail logic
|
||||
InitializeTenancyByDomain::$onFail = null;
|
||||
|
||||
// Enable UniversalRoute feature
|
||||
Route::middlewareGroup('universal', []);
|
||||
config(['tenancy.features' => [UniversalRoutes::class]]);
|
||||
|
||||
$this->expectException(TenantCouldNotBeIdentifiedOnDomainException::class);
|
||||
$this->withoutExceptionHandling()->get('http://foo.localhost/foo/abc/xyz');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue