3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-30 04:14:17 +00:00
Files
snipe-it/tests/TestCase.php
2023-03-02 13:12:25 -08:00

26 lines
540 B
PHP

<?php
namespace Tests;
use App\Http\Middleware\SecurityHeaders;
use App\Models\Setting;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
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);
}
}