diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-02 19:34:20 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 14:52:47 +0100 |
commit | 68ec18323d07e7293fd59c82d51300a6d9d68176 (patch) | |
tree | f8b2094b663d481dda920d1df8f9c852fa42ee36 /tests/lib | |
parent | 252d2d39583c7daf838a6a24d0f72660ed01c371 (diff) | |
download | nextcloud-server-68ec18323d07e7293fd59c82d51300a6d9d68176.tar.gz nextcloud-server-68ec18323d07e7293fd59c82d51300a6d9d68176.zip |
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')
-rw-r--r-- | tests/lib/Group/ManagerTest.php | 3 |
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); |