summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-02-22 16:36:25 +0100
committerRobin Appelman <robin@icewind.nl>2019-02-25 16:06:09 +0100
commitdb750898ee3cb165218f4428265ab9dc258c93c2 (patch)
tree5a9e6472b98992b35b62ca7d5d1b1273f8466f48 /tests
parentd7538f9a61a2af288d82fc257524aee5c2f86769 (diff)
downloadnextcloud-server-db750898ee3cb165218f4428265ab9dc258c93c2.tar.gz
nextcloud-server-db750898ee3cb165218f4428265ab9dc258c93c2.zip
allow group backends to mark that a group should now be shown in search dialogs
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Collaboration/Collaborators/GroupPluginTest.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
index 9849bdb874a..36d98ee302f 100644
--- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
@@ -101,9 +101,10 @@ class GroupPluginTest extends TestCase {
/**
* @param string $gid
* @param null $displayName
+ * @param bool $hide
* @return IGroup|\PHPUnit_Framework_MockObject_MockObject
*/
- protected function getGroupMock($gid, $displayName = null) {
+ protected function getGroupMock($gid, $displayName = null, $hide = false) {
$group = $this->createMock(IGroup::class);
$group->expects($this->any())
@@ -119,6 +120,9 @@ class GroupPluginTest extends TestCase {
->method('getDisplayName')
->willReturn($displayName);
+ $group->method('hideFromCollaboration')
+ ->willReturn($hide);
+
return $group;
}
@@ -413,7 +417,20 @@ class GroupPluginTest extends TestCase {
true,
$this->getGroupMock('test'),
],
+ [
+ 'test', false, false,
+ [
+ $this->getGroupMock('test', null, true),
+ $this->getGroupMock('test1'),
+ ],
+ [],
+ [],
+ [],
+ true,
+ false,
+ ],
];
+
}
/**