From c49f15b53d2f139635ee3c82bb6b6c38268ba6e3 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Tue, 21 Feb 2023 10:48:24 +0100 Subject: [PATCH] Update RedirectTest --- tests/Features/RedirectTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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';