Move to a static constructor

This commit is contained in:
Marcus Moore 2023-04-06 17:42:15 -07:00
parent bbfb6c338a
commit 8ac4d3aeea
No known key found for this signature in database
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();
}
}