diff options
Diffstat (limited to 'apps/user_ldap/tests/group_ldap.php')
-rw-r--r-- | apps/user_ldap/tests/group_ldap.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 44f0f82c2f7..f2b16ee2eab 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -298,4 +298,18 @@ class Test_Group_Ldap extends \Test\TestCase { $groupBackend->inGroup($uid, $gid); } + public function testGetGroupsWithOffset() { + $access = $this->getAccessMock(); + $this->enableGroups($access); + + $access->expects($this->once()) + ->method('ownCloudGroupNames') + ->will($this->returnValue(array('group1', 'group2'))); + + $groupBackend = new GroupLDAP($access); + $groups = $groupBackend->getGroups('', 2, 2); + + $this->assertSame(2, count($groups)); + } + } |