Set SettingService behind a Facade

This commit is contained in:
Bubka
2022-07-30 17:51:02 +02:00
parent be632bb489
commit f7ac1e96c3
21 changed files with 101 additions and 208 deletions

View File

@ -50,10 +50,6 @@ class TwoFAccountModelTest extends ModelTestCase
->andReturn(true);
});
// \Facades\App\Services\SettingService::shouldReceive('get')
// ->with('useEncryption')
// ->andReturn(true);
$twofaccount = TwoFAccount::factory()->make([
$attribute => 'string',
]);
@ -92,10 +88,6 @@ class TwoFAccountModelTest extends ModelTestCase
->andReturn(false);
});
// \Facades\App\Services\SettingService::shouldReceive('get')
// ->with('useEncryption')
// ->andReturn(false);
$twofaccount = TwoFAccount::factory()->make();
$this->assertEquals($twofaccount->getAttributes()[$attribute], $twofaccount->$attribute);
@ -115,10 +107,6 @@ class TwoFAccountModelTest extends ModelTestCase
->andReturn(true);
});
// \Facades\App\Services\SettingService::shouldReceive('get')
// ->with('useEncryption')
// ->andReturn(true);
Crypt::shouldReceive('encryptString')
->andReturn('indecipherableString');