aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Util
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-19 16:09:11 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-20 08:08:01 +0100
commitb367027798e1d666ae847453b1ce6faa89895a36 (patch)
tree944f5b5bb90b9db1d1147395239fce3b3e4dd51a /tests/lib/Util
parentafa0f2c0d8507018cdf556a1b6f146a9ddaa2b21 (diff)
downloadnextcloud-server-b367027798e1d666ae847453b1ce6faa89895a36.tar.gz
nextcloud-server-b367027798e1d666ae847453b1ce6faa89895a36.zip
Do pagination on the dummy group backend
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Util')
-rw-r--r--tests/lib/Util/Group/Dummy.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php
index 8f06316ca03..0681a317c28 100644
--- a/tests/lib/Util/Group/Dummy.php
+++ b/tests/lib/Util/Group/Dummy.php
@@ -177,7 +177,8 @@ class Dummy extends Backend {
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if(isset($this->groups[$gid])) {
if(empty($search)) {
- return $this->groups[$gid];
+ $length = $limit < 0 ? null : $limit;
+ return array_slice($this->groups[$gid], $offset, $length);
}
$result = array();
foreach($this->groups[$gid] as $user) {