Clear the settings cache on app destruction

This commit is contained in:
Marcus Moore 2023-05-01 16:04:43 -07:00
parent 031c9c1204
commit 6d594faae7
No known key found for this signature in database

View file

@ -2,6 +2,8 @@
namespace Tests\Support; namespace Tests\Support;
use App\Models\Setting;
trait InteractsWithSettings trait InteractsWithSettings
{ {
protected Settings $settings; protected Settings $settings;
@ -9,5 +11,7 @@ trait InteractsWithSettings
public function setUpSettings() public function setUpSettings()
{ {
$this->settings = Settings::initialize(); $this->settings = Settings::initialize();
$this->beforeApplicationDestroyed(fn() => Setting::$_cache = null);
} }
} }