Globally disable SecurityHeaders in tests
This commit is contained in:
parent
4197e613b2
commit
75fc624ec6
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue