Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-02 21:34:20 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-03 16:52:47 +0300
commit68ec18323d07e7293fd59c82d51300a6d9d68176 (patch)
treef8b2094b663d481dda920d1df8f9c852fa42ee36 /tests/lib/Group/ManagerTest.php
parent252d2d39583c7daf838a6a24d0f72660ed01c371 (diff)
Fix types in the Group Manager
Psalm found an issue. However the issue found was because of lying docblocks. Fixed those and did some typing to make it all better. For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Group/ManagerTest.php')
-rw-r--r--tests/lib/Group/ManagerTest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index 8b6be03615a..dfe21b825f7 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -395,6 +395,7 @@ class ManagerTest extends TestCase {
*/
$backend = $this->getTestBackend();
$backend->method('getUserGroups')
+ ->with('myUID')
->willReturn(['123', 'abc']);
$manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger);
@@ -402,6 +403,8 @@ class ManagerTest extends TestCase {
/** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
+ $user->method('getUID')
+ ->willReturn('myUID');
$groups = $manager->getUserGroupIds($user);
$this->assertCount(2, $groups);