snipe-it/tests/Support/InitializesSettings.php

18 lines
303 B
PHP
Raw Normal View History

<?php
namespace Tests\Support;
use App\Models\Setting;
2024-03-14 15:06:52 -07:00
trait InitializesSettings
{
protected Settings $settings;
2023-05-01 16:06:28 -07:00
public function initializeSettings()
{
$this->settings = Settings::initialize();
$this->beforeApplicationDestroyed(fn() => Setting::$_cache = null);
}
}