summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/user
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-07-17 18:57:56 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-07-17 18:57:56 +0200
commit4f910221c4f538fba44c0cafd6ad6c342ccc7f28 (patch)
tree077832a90946d37c241bef9945d98d1bd625c736 /apps/user_ldap/tests/user
parent37d085901b5eec59d1cf79356c7e8656599bc638 (diff)
downloadnextcloud-server-4f910221c4f538fba44c0cafd6ad6c342ccc7f28.tar.gz
nextcloud-server-4f910221c4f538fba44c0cafd6ad6c342ccc7f28.zip
fix runtime caching in ldap's user manager, fixes #17631
Diffstat (limited to 'apps/user_ldap/tests/user')
-rw-r--r--apps/user_ldap/tests/user/manager.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/user/manager.php b/apps/user_ldap/tests/user/manager.php
index e86db6b9f81..f7e4a1a5e89 100644
--- a/apps/user_ldap/tests/user/manager.php
+++ b/apps/user_ldap/tests/user/manager.php
@@ -64,6 +64,10 @@ class Test_User_Manager extends \Test\TestCase {
$manager->setLdapAccess($access);
$user = $manager->get($inputDN);
+ // Now we fetch the user again. If this leads to a failing test,
+ // runtime caching the manager is broken.
+ $user = $manager->get($inputDN);
+
$this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user);
}
@@ -173,6 +177,10 @@ class Test_User_Manager extends \Test\TestCase {
$manager->setLdapAccess($access);
$user = $manager->get($uid);
+ // Now we fetch the user again. If this leads to a failing test,
+ // runtime caching the manager is broken.
+ $user = $manager->get($uid);
+
$this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user);
}