diff options
Diffstat (limited to 'apps/user_ldap/tests/User_LDAPTest.php')
-rw-r--r-- | apps/user_ldap/tests/User_LDAPTest.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 00ca6737175..bfdaa99ac00 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -183,6 +183,10 @@ class User_LDAPTest extends TestCase { } return false; }); + + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); } public function testCheckPasswordUidReturn() { @@ -400,6 +404,10 @@ class User_LDAPTest extends TestCase { ->willReturnArgument(0); $this->access->method('fetchUsersByLoginName') ->willReturn([]); + + $this->access->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); } public function testGetUsersNoParam() { @@ -1065,6 +1073,9 @@ class User_LDAPTest extends TestCase { ->method('get') ->with($dn) ->willReturn($user); + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); $name = $backend->loginName2UserName($loginName); $this->assertSame($username, $name); @@ -1093,6 +1104,10 @@ class User_LDAPTest extends TestCase { ->method('writeToCache') ->with($this->equalTo('loginName2UserName-'.$loginName), false); + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); + $backend = new UserLDAP($this->access, $this->config, $this->notificationManager, $this->session, $this->pluginManager); $name = $backend->loginName2UserName($loginName); $this->assertSame(false, $name); @@ -1126,6 +1141,9 @@ class User_LDAPTest extends TestCase { ->method('get') ->with($dn) ->willReturn($offlineUser); + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); $backend = new UserLDAP($this->access, $this->config, $this->notificationManager, $this->session, $this->pluginManager); $name = $backend->loginName2UserName($loginName); |