summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-06-16 10:08:49 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-06-16 10:12:16 +0200
commita40d64ff7fdf65049a1a60196761fa743728e2da (patch)
tree81fd6408cd6a0b881dedc6f0cd23e6e4964f11b5 /tests
parent9c328de4abaa61a19be2ffb9ff80f52cb2dcb6c3 (diff)
downloadnextcloud-server-a40d64ff7fdf65049a1a60196761fa743728e2da.tar.gz
nextcloud-server-a40d64ff7fdf65049a1a60196761fa743728e2da.zip
load 2FA provider apps before querying classes
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/TwoFactorAuth/ManagerTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
index 363229b01bc..283ba7f9424 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
@@ -55,7 +55,10 @@ class ManagerTest extends TestCase {
$this->session = $this->getMock('\OCP\ISession');
$this->config = $this->getMock('\OCP\IConfig');
- $this->manager = new Manager($this->appManager, $this->session, $this->config);
+ $this->manager = $this->getMockBuilder('\OC\Authentication\TwoFactorAuth\Manager')
+ ->setConstructorArgs([$this->appManager, $this->session, $this->config])
+ ->setMethods(['loadTwoFactorApp']) // Do not actually load the apps
+ ->getMock();
$this->fakeProvider = $this->getMock('\OCP\Authentication\TwoFactorAuth\IProvider');
$this->fakeProvider->expects($this->any())