A free open source IT asset/license management system
Globally disable SecurityHeaders in tests
Marcus Moore75fc624ec65d
diff --git a/tests/TestCase.php b/tests/TestCase.phpindex 5082341307..4a19344eb3 100644--- a/tests/TestCase.php+++ b/tests/TestCase.php@@ -2,6 +2,7 @@namespace Tests;+use App\Http\Middleware\SecurityHeaders;use App\Models\Setting;use Illuminate\Foundation\Testing\TestCase as BaseTestCase;@@ -9,10 +10,16 @@ abstract class TestCase extends BaseTestCase{use CreatesApplication;+ private array $globallyDisabledMiddleware = [+ SecurityHeaders::class,+ ];+protected function setUp(): void{parent::setUp();$this->beforeApplicationDestroyed(fn() => Setting::$_cache = null);++ $this->withoutMiddleware($this->globallyDisabledMiddleware);}}