diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/CalDAV/PublicCalendarRoot.php | 11 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php | 9 |
2 files changed, 4 insertions, 16 deletions
diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php index 6d74b97f96e..94fb7e5e4d5 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php +++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php @@ -21,7 +21,6 @@ namespace OCA\DAV\CalDAV; use Sabre\DAV\Collection; -use Sabre\DAV\Exception\NotFound; class PublicCalendarRoot extends Collection { @@ -48,6 +47,7 @@ class PublicCalendarRoot extends Collection { */ function getChild($name) { $calendar = $this->caldavBackend->getPublicCalendar($name); + $calendar['{http://owncloud.org/ns}owner-principal'] = ''; return new Calendar($this->caldavBackend, $calendar, $this->l10n); } @@ -55,13 +55,6 @@ class PublicCalendarRoot extends Collection { * @inheritdoc */ function getChildren() { - $calendars = $this->caldavBackend->getPublicCalendars(); - $children = []; - foreach ($calendars as $calendar) { - // TODO: maybe implement a new class PublicCalendar ??? - $children[] = new Calendar($this->caldavBackend, $calendar, $this->l10n); - } - - return $children; + return []; } } diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index 59fa4747a93..ccef0cf678b 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -21,7 +21,7 @@ use Test\TestCase; */ class PublicCalendarRootTest extends TestCase { - const UNIT_TEST_USER = 'principals/users/caldav-unit-test'; + const UNIT_TEST_USER = ''; /** @var CalDavBackend */ private $backend; /** @var PublicCalendarRoot */ @@ -92,13 +92,8 @@ class PublicCalendarRootTest extends TestCase { public function testGetChildren() { $this->createPublicCalendar(); - - $publicCalendars = $this->backend->getPublicCalendars(); - $calendarResults = $this->publicCalendarRoot->getChildren(); - - $this->assertEquals(1, count($calendarResults)); - $this->assertEquals(new Calendar($this->backend, $publicCalendars[0], $this->l10n), $calendarResults[0]); + $this->assertSame([], $calendarResults); } /** |