snipe-it/tests/TestCase.php

26 lines
540 B
PHP
Raw Normal View History

2016-03-25 01:18:05 -07:00
<?php
namespace Tests;
use App\Http\Middleware\SecurityHeaders;
2023-02-02 17:41:32 -08:00
use App\Models\Setting;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
2016-03-25 01:18:05 -07:00
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
2023-02-02 17:41:32 -08:00
private array $globallyDisabledMiddleware = [
SecurityHeaders::class,
];
2023-02-02 17:41:32 -08:00
protected function setUp(): void
{
parent::setUp();
$this->beforeApplicationDestroyed(fn() => Setting::$_cache = null);
$this->withoutMiddleware($this->globallyDisabledMiddleware);
2023-02-02 17:41:32 -08:00
}
}