summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-02-28 13:32:26 +0100
committerGitHub <noreply@github.com>2019-02-28 13:32:26 +0100
commita43ffc7dec1e34e4c1159877ee3ff3a438de2b28 (patch)
treec50728aa940be200608c63cface55b0109c3419c /tests
parent8dc83e19445b236ccc7ac02878c82fd300f7e573 (diff)
parentc621da4fd682990af1520e0313dd763c621b041f (diff)
downloadnextcloud-server-a43ffc7dec1e34e4c1159877ee3ff3a438de2b28.tar.gz
nextcloud-server-a43ffc7dec1e34e4c1159877ee3ff3a438de2b28.zip
Merge pull request #13489 from nextcloud/enh/settings/2fa-security-store
Do not load 2fa admin settings async
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Settings/Admin/SecurityTest.php13
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
);
}