function testGetChild() { $backend = new Backend\MockSharing(); $calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']); $result = $calendarHome->getChild('notifications'); $this->assertEquals('notifications', $result->getName()); }
/** * @expectedException \Sabre\DAV\Exception\InvalidResourceType */ public function testNoSubscriptionSupport() { $principal = ['uri' => 'principals/user1']; $backend = new Backend\Mock([], []); $uC = new CalendarHome($backend, $principal); $rt = ['{DAV:}collection', '{http://calendarserver.org/ns/}subscribed']; $props = ['{DAV:}displayname' => 'baz', '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Property\Href('http://example.org/test2.ics')]; $uC->createExtendedCollection('sub2', $rt, $props); }
public function __construct(BackendInterface $caldavBackend, $principalInfo) { parent::__construct($caldavBackend, $principalInfo); $this->l10n = \OC::$server->getL10N('dav'); }