From 6ee7286b419f77ae127257bbbf6a57415678076c Mon Sep 17 00:00:00 2001 From: Julius Härtl <jus@bitgrid.net> Date: Sun, 24 Feb 2019 08:54:43 +0100 Subject: Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl <jus@bitgrid.net> --- apps/user_ldap/tests/LDAPProviderTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/user_ldap') 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']) -- cgit v1.2.3