diff options
author | Joas Schilling <coding@schilljs.com> | 2022-10-12 16:03:57 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-10-12 16:03:57 +0200 |
commit | e674087ebf5630834248098eefa1004a98f46468 (patch) | |
tree | 2215b8b50a613af969f1bf7514a055a37bd51a8d /tests/lib/Share20/DefaultShareProviderTest.php | |
parent | 99953a859b50d2e4d481ada903b38f6b3b87acd7 (diff) | |
download | nextcloud-server-e674087ebf5630834248098eefa1004a98f46468.tar.gz nextcloud-server-e674087ebf5630834248098eefa1004a98f46468.zip |
Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Share20/DefaultShareProviderTest.php')
-rw-r--r-- | tests/lib/Share20/DefaultShareProviderTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index ed2bc2a4eda..d7b5dbc9b74 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -365,6 +365,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $group0 = $this->createMock(IGroup::class); $group0->method('inGroup')->with($user1)->willReturn(true); + $group0->method('getDisplayName')->willReturn('g0-displayname'); $node = $this->createMock(Folder::class); $node->method('getId')->willReturn(42); @@ -1488,6 +1489,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $group = $this->createMock(IGroup::class); $group->method('getGID')->willReturn('group'); $group->method('inGroup')->with($user2)->willReturn(true); + $group->method('getDisplayName')->willReturn('group-displayname'); $this->groupManager->method('get')->with('group')->willReturn($group); $file = $this->createMock(File::class); @@ -1559,6 +1561,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $group = $this->createMock(IGroup::class); $group->method('getGID')->willReturn('group'); $group->method('inGroup')->with($user2)->willReturn(true); + $group->method('getDisplayName')->willReturn('group-displayname'); $this->groupManager->method('get')->with('group')->willReturn($group); $file = $this->createMock(File::class); @@ -1616,6 +1619,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $group = $this->createMock(IGroup::class); $group->method('getGID')->willReturn('group'); $group->method('inGroup')->with($user2)->willReturn(false); + $group->method('getDisplayName')->willReturn('group-displayname'); $this->groupManager->method('get')->with('group')->willReturn($group); $file = $this->createMock(File::class); @@ -2002,6 +2006,7 @@ class DefaultShareProviderTest extends \Test\TestCase { for ($i = 0; $i < 2; $i++) { $group = $this->createMock(IGroup::class); $group->method('getGID')->willReturn('group'.$i); + $group->method('getDisplayName')->willReturn('group-displayname' . $i); $groups['group'.$i] = $group; } @@ -2080,6 +2085,7 @@ class DefaultShareProviderTest extends \Test\TestCase { for ($i = 0; $i < 2; $i++) { $group = $this->createMock(IGroup::class); $group->method('getGID')->willReturn('group'.$i); + $group->method('getDisplayName')->willReturn('group-displayname'.$i); $groups['group'.$i] = $group; } @@ -2196,6 +2202,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $group0 = $this->createMock(IGroup::class); $group0->method('getGID')->willReturn('group0'); $group0->method('inGroup')->with($user0)->willReturn(true); + $group0->method('getDisplayName')->willReturn('group0-displayname'); $this->groupManager->method('get')->with('group0')->willReturn($group0); |