summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CalDAV')
-rw-r--r--apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php3
-rw-r--r--apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php7
2 files changed, 10 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php
index bc161b00d91..a7bf4432c64 100644
--- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php
@@ -91,6 +91,9 @@ abstract class AbstractCalDavBackendTest extends TestCase {
if (is_null($this->backend)) {
return;
}
+ $this->principal->expects($this->any())->method('getGroupMembership')
+ ->withAnyParameters()
+ ->willReturn([self::UNIT_TEST_GROUP, self::UNIT_TEST_GROUP2]);
$calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER);
foreach ($calendars as $calendar) {
$this->dispatcher->expects($this->at(0))
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
index 7c424fd0dd1..eb9f9cd10d7 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -46,6 +46,10 @@ class PublicCalendarRootTest extends TestCase {
$this->random = \OC::$server->getSecureRandom();
$dispatcher = $this->createMock(EventDispatcherInterface::class);
+ $this->principal->expects($this->any())->method('getGroupMembership')
+ ->withAnyParameters()
+ ->willReturn([]);
+
$this->backend = new CalDavBackend(
$db,
$this->principal,
@@ -66,6 +70,9 @@ class PublicCalendarRootTest extends TestCase {
if (is_null($this->backend)) {
return;
}
+ $this->principal->expects($this->any())->method('getGroupMembership')
+ ->withAnyParameters()
+ ->willReturn([]);
$books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER);
foreach ($books as $book) {
$this->backend->deleteCalendar($book['id']);