diff --git a/tests/Features/RedirectTest.php b/tests/Features/RedirectTest.php index 4c836fab..d2046d37 100644 --- a/tests/Features/RedirectTest.php +++ b/tests/Features/RedirectTest.php @@ -7,6 +7,10 @@ use Illuminate\Support\Facades\Route; use Stancl\Tenancy\TenancyServiceProvider; use Stancl\Tenancy\Features\CrossDomainRedirect; +beforeAll(function () { + TenancyServiceProvider::$bootstrapFeatures = false; +}); + test('tenant redirect macro replaces only the hostname', function () { config()->set('tenancy.features', [CrossDomainRedirect::class]); @@ -40,10 +44,10 @@ test('tenant route helper generates correct url', function () { test('redirect from central to tenant works', function (bool $enabled, bool $shouldThrow) { if ($enabled) { config()->set('tenancy.features', [CrossDomainRedirect::class]); - - TenancyServiceProvider::bootstrapFeatures(); } + TenancyServiceProvider::bootstrapFeatures(); + Route::get('/foobar', function () { return 'Foo';