Improve InteractsWithSettings name

This commit is contained in:
Marcus Moore 2024-03-14 15:06:52 -07:00
parent 8003615b1f
commit 95ff692b14
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View file

@ -4,7 +4,7 @@ namespace Tests\Support;
use App\Models\Setting; use App\Models\Setting;
trait InteractsWithSettings trait InitializesSettings
{ {
protected Settings $settings; protected Settings $settings;

View file

@ -8,14 +8,14 @@ use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use RuntimeException; use RuntimeException;
use Tests\Support\CustomTestMacros; use Tests\Support\CustomTestMacros;
use Tests\Support\InteractsWithAuthentication; use Tests\Support\InteractsWithAuthentication;
use Tests\Support\InteractsWithSettings; use Tests\Support\InitializesSettings;
abstract class TestCase extends BaseTestCase abstract class TestCase extends BaseTestCase
{ {
use CreatesApplication; use CreatesApplication;
use CustomTestMacros; use CustomTestMacros;
use InteractsWithAuthentication; use InteractsWithAuthentication;
use InteractsWithSettings; use InitializesSettings;
use LazilyRefreshDatabase; use LazilyRefreshDatabase;
private array $globallyDisabledMiddleware = [ private array $globallyDisabledMiddleware = [
@ -34,9 +34,7 @@ abstract class TestCase extends BaseTestCase
$this->withoutMiddleware($this->globallyDisabledMiddleware); $this->withoutMiddleware($this->globallyDisabledMiddleware);
if (collect(class_uses_recursive($this))->contains(InteractsWithSettings::class)) {
$this->initializeSettings(); $this->initializeSettings();
}
$this->registerCustomMacros(); $this->registerCustomMacros();
} }