summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-02-24 08:54:43 +0100
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:57:01 +0100
commit6ee7286b419f77ae127257bbbf6a57415678076c (patch)
treeff3da316e3dbfcf8cf8ceb633a38119e51c7314d /apps/user_ldap
parentba2b5427753c827ad34388ac26ed67f3b72812c2 (diff)
downloadnextcloud-server-6ee7286b419f77ae127257bbbf6a57415678076c.tar.gz
nextcloud-server-6ee7286b419f77ae127257bbbf6a57415678076c.zip
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/tests/LDAPProviderTest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php
index 8df527e0dd8..1d540c42557 100644
--- a/apps/user_ldap/tests/LDAPProviderTest.php
+++ b/apps/user_ldap/tests/LDAPProviderTest.php
@@ -25,10 +25,12 @@
namespace OCA\User_LDAP\Tests;
+use OC\User\Manager;
use OCA\User_LDAP\IGroupLDAP;
use OCP\IConfig;
use OCP\IServerContainer;
use OCA\User_LDAP\IUserLDAP;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class LDAPProviderTest
@@ -60,21 +62,21 @@ class LDAPProviderTest extends \Test\TestCase {
$server->expects($this->any())
->method($this->anything())
->willReturnSelf();
-
+
return $server;
}
private function getUserManagerMock(IUserLDAP $userBackend) {
- $userManager = $this->getMockBuilder('OC\User\Manager')
+ $userManager = $this->getMockBuilder(Manager::class)
->setMethods(['getBackends'])
- ->setConstructorArgs([$this->createMock(IConfig::class)])
+ ->setConstructorArgs([$this->createMock(IConfig::class), $this->createMock(EventDispatcherInterface::class)])
->getMock();
$userManager->expects($this->any())
->method('getBackends')
->willReturn([$userBackend]);
return $userManager;
}
-
+
private function getGroupManagerMock(IGroupLDAP $groupBackend) {
$groupManager = $this->getMockBuilder('OC\Group\Manager')
->setMethods(['getBackends'])