diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php
index 8f06316ca0392d079ece3543ce986b627f565dd8..0681a317c28136ee97cf0fc48f71ff2985128ee7 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) {