mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
33 lines
779 B
PHP
33 lines
779 B
PHP
<?php
|
|
|
|
namespace Tests;
|
|
|
|
use App\Http\Middleware\SecurityHeaders;
|
|
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
|
use Tests\Support\InteractsWithSettings;
|
|
use Tests\Support\Settings;
|
|
|
|
abstract class TestCase extends BaseTestCase
|
|
{
|
|
use CreatesApplication;
|
|
use LazilyRefreshDatabase;
|
|
|
|
protected Settings $settings;
|
|
|
|
private array $globallyDisabledMiddleware = [
|
|
SecurityHeaders::class,
|
|
];
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->withoutMiddleware($this->globallyDisabledMiddleware);
|
|
|
|
if (in_array(InteractsWithSettings::class, class_uses_recursive($this))) {
|
|
$this->settings = Settings::initialize();
|
|
}
|
|
}
|
|
}
|