aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-02 17:10:31 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-27 12:00:45 +0200
commitb6c17c6ce76080df0e291f60a85c0e42afab8f39 (patch)
tree3b26ccfc21ffe384a0c972d37a1ae2f12c7e7da5 /tests
parent6385a5af36957cac4e1beed531d941129eb3a5a0 (diff)
downloadnextcloud-server-b6c17c6ce76080df0e291f60a85c0e42afab8f39.tar.gz
nextcloud-server-b6c17c6ce76080df0e291f60a85c0e42afab8f39.zip
Clear up return types
usersInGroup index by int for BC, searchInGroup index by uid (string). Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Group/ManagerTest.php4
-rw-r--r--tests/lib/Util/Group/Dummy.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index 1bdb2219346..186f9d619a2 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -737,7 +737,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('searchInGroup')
->with('testgroup', '', -1, 0)
- ->willReturn([$this->getTestUser('user2'), $this->getTestUser('user33')]);
+ ->willReturn(['user2' => $this->getTestUser('user2'), 'user33' => $this->getTestUser('user33')]);
$this->userManager->expects($this->never())->method('get');
@@ -793,7 +793,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('searchInGroup')
->with('testgroup', '', 1, 1)
- ->willReturn([$this->getTestUser('user33')]);
+ ->willReturn(['user33' => $this->getTestUser('user33')]);
$this->userManager->expects($this->never())->method('get');
diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php
index 2d86e45cfc1..a864c8ce9d9 100644
--- a/tests/lib/Util/Group/Dummy.php
+++ b/tests/lib/Util/Group/Dummy.php
@@ -208,7 +208,7 @@ class Dummy extends ABackend implements ICreateGroupBackend, IDeleteGroupBackend
$result = [];
foreach ($this->groups[$gid] as $user) {
if (stripos($user, $search) !== false) {
- $result[] = new DummyUser($user, '');
+ $result[$user] = new DummyUser($user, '');
}
}
return $result;