3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 20:45:30 +00:00

Move to a static constructor

This commit is contained in:
Marcus Moore
2023-04-06 17:42:15 -07:00
parent bbfb6c338a
commit 8ac4d3aeea
2 changed files with 7 additions and 2 deletions

View File

@ -8,11 +8,16 @@ class Settings
{
private Setting $setting;
public function __construct()
private function __construct()
{
$this->setting = Setting::factory()->create();
}
public static function initialize()
{
return new self();
}
public function enableMultipleFullCompanySupport()
{
$this->update(['full_multiple_companies_support' => 1]);

View File

@ -24,6 +24,6 @@ abstract class TestCase extends BaseTestCase
$this->withoutMiddleware($this->globallyDisabledMiddleware);
$this->settings = new Settings();
$this->settings = Settings::initialize();
}
}