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:
@ -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]);
|
||||
|
||||
@ -24,6 +24,6 @@ abstract class TestCase extends BaseTestCase
|
||||
|
||||
$this->withoutMiddleware($this->globallyDisabledMiddleware);
|
||||
|
||||
$this->settings = new Settings();
|
||||
$this->settings = Settings::initialize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user