diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-12-07 22:02:54 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-12-07 22:47:32 +0100 |
commit | 27f14eee26af750e9e246668e761a9bf98b17fee (patch) | |
tree | 91a2922d2d32fbeb5c6e16f43bff77882cc702bc /apps/user_ldap/tests | |
parent | 991190b9946442c685d5d58530fe602e008f9a4b (diff) | |
download | nextcloud-server-27f14eee26af750e9e246668e761a9bf98b17fee.tar.gz nextcloud-server-27f14eee26af750e9e246668e761a9bf98b17fee.zip |
don't cache user, if no internal user id was retrieved/assigned
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r-- | apps/user_ldap/tests/AccessTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index d0693fe50e1..cbb695d779a 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -620,6 +620,13 @@ class AccessTest extends TestCase { ->method('writeToCache') ->with($this->stringStartsWith('userExists'), true); + $this->userMapper->expects($this->exactly($fakeLdapEntries['count'])) + ->method('getNameByDN') + ->willReturnCallback(function($fdn) { + $parts = ldap_explode_dn($fdn, false); + return $parts[0]; + }); + /** @noinspection PhpUnhandledExceptionInspection */ $list = $this->access->fetchListOfUsers($filter, $attrs); $this->assertSame($expected, $list); |