diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-10 16:04:13 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-28 11:55:58 +0100 |
commit | c621da4fd682990af1520e0313dd763c621b041f (patch) | |
tree | d4083b957f4f5102f31780edf521e0d67512f9f7 /tests/lib/Settings | |
parent | 4af583e23f922824e8e9ad2bf6347e6a1f163d8f (diff) | |
download | nextcloud-server-c621da4fd682990af1520e0313dd763c621b041f.tar.gz nextcloud-server-c621da4fd682990af1520e0313dd763c621b041f.zip |
Do not load 2fa admin settings async
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Settings')
-rw-r--r-- | tests/lib/Settings/Admin/SecurityTest.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/lib/Settings/Admin/SecurityTest.php b/tests/lib/Settings/Admin/SecurityTest.php index a7c56f697b0..6a9d84bd40d 100644 --- a/tests/lib/Settings/Admin/SecurityTest.php +++ b/tests/lib/Settings/Admin/SecurityTest.php @@ -23,10 +23,13 @@ namespace Test\Settings\Admin; +use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor; use OC\Encryption\Manager; use OC\Settings\Admin\Security; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IInitialStateService; use OCP\IUserManager; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class SecurityTest extends TestCase { @@ -36,15 +39,23 @@ class SecurityTest extends TestCase { private $manager; /** @var IUserManager */ private $userManager; + /** @var MandatoryTwoFactor|MockObject */ + private $mandatoryTwoFactor; + /** @var IInitialStateService|MockObject */ + private $initialState; public function setUp() { parent::setUp(); $this->manager = $this->getMockBuilder('\OC\Encryption\Manager')->disableOriginalConstructor()->getMock(); $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); + $this->mandatoryTwoFactor = $this->createMock(MandatoryTwoFactor::class); + $this->initialState = $this->createMock(IInitialStateService::class); $this->admin = new Security( $this->manager, - $this->userManager + $this->userManager, + $this->mandatoryTwoFactor, + $this->initialState ); } |