summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorFrédéric Fortier <frederic.fortier@oronospolytechnique.com>2015-08-03 20:15:22 -0400
committerFrédéric Fortier <frederic.fortier@oronospolytechnique.com>2015-08-03 20:15:22 -0400
commit7604bcb3cb07389d76e1f4e8b2023003845efbdd (patch)
tree248067256ea759e2d7c7a88ee6035cf0d623664a /apps/user_ldap/tests
parent11244736ae6d44629d312d1e2730f60f06ccebcf (diff)
downloadnextcloud-server-7604bcb3cb07389d76e1f4e8b2023003845efbdd.tar.gz
nextcloud-server-7604bcb3cb07389d76e1f4e8b2023003845efbdd.zip
Properly nest groups when using memberOf to detect group membership, fixes #17759
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r--apps/user_ldap/tests/group_ldap.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php
index f716618ce48..805238e7d37 100644
--- a/apps/user_ldap/tests/group_ldap.php
+++ b/apps/user_ldap/tests/group_ldap.php
@@ -395,16 +395,15 @@ class Test_Group_Ldap extends \Test\TestCase {
->method('username2dn')
->will($this->returnValue($dn));
- $access->expects($this->once())
+ $access->expects($this->exactly(3))
->method('readAttribute')
- ->with($dn, 'memberOf')
- ->will($this->returnValue(['cn=groupA,dc=foobar', 'cn=groupB,dc=foobar']));
+ ->will($this->onConsecutiveCalls(['cn=groupA,dc=foobar', 'cn=groupB,dc=foobar'], [], []));
$access->expects($this->exactly(2))
->method('dn2groupname')
->will($this->returnArgument(0));
- $access->expects($this->once())
+ $access->expects($this->exactly(3))
->method('groupsMatchFilter')
->will($this->returnArgument(0));