23 $this->usercalendars =
new CalendarHome($this->backend, [
24 'uri' =>
'principals/user1'
31 $this->assertEquals(
'user1', $this->usercalendars->getName());
41 $this->usercalendars->getChild(
'randomname');
47 $this->assertFalse($this->usercalendars->childExists(
'foo'));
48 $this->assertTrue($this->usercalendars->childExists(
'UUID-123467'));
54 $this->assertEquals(
'principals/user1', $this->usercalendars->getOwner());
60 $this->assertNull($this->usercalendars->getGroup());
68 'privilege' =>
'{DAV:}read',
69 'principal' =>
'principals/user1',
73 'privilege' =>
'{DAV:}write',
74 'principal' =>
'principals/user1',
78 'privilege' =>
'{DAV:}read',
79 'principal' =>
'principals/user1/calendar-proxy-write',
83 'privilege' =>
'{DAV:}write',
84 'principal' =>
'principals/user1/calendar-proxy-write',
88 'privilege' =>
'{DAV:}read',
89 'principal' =>
'principals/user1/calendar-proxy-read',
93 $this->assertEquals($expected, $this->usercalendars->getACL());
102 $this->usercalendars->setACL([]);
112 $this->usercalendars->setName(
'bla');
122 $this->usercalendars->delete();
131 $this->assertNull($this->usercalendars->getLastModified());
141 $this->usercalendars->createFile(
'bla');
152 $this->usercalendars->createDirectory(
'bla');
162 [
'{DAV:}collection',
'{urn:ietf:params:xml:ns:caldav}calendar'],
165 $result = $this->usercalendars->createExtendedCollection(
'newcalendar', $mkCol);
167 $cals = $this->backend->getCalendarsForUser(
'principals/user1');
168 $this->assertEquals(3, count($cals));
179 [
'{DAV:}collection',
'{DAV:}blabla'],
182 $this->usercalendars->createExtendedCollection(
'newcalendar', $mkCol);
193 [
'{DAV:}collection'],
196 $this->usercalendars->createExtendedCollection(
'newcalendar', $mkCol);
202 $this->assertNull($this->usercalendars->getSupportedPrivilegeSet());
211 $this->usercalendars->shareReply(
'uri', DAV\Sharing\Plugin::INVITE_DECLINED,
'curi',
'1');
An exception for terminatinating execution or to throw for unit testing.
testShareReplyFail()
@expectedException Sabre\DAV\Exception\NotImplemented
testCreateExtendedCollectionBadResourceType()
@expectedException Sabre\DAV\Exception\InvalidResourceType @depends testSimple
testCreateExtendedCollection()
@depends testSimple
testCreateFile()
@expectedException \Sabre\DAV\Exception\MethodNotAllowed @depends testSimple
testGetLastModified()
@depends testSimple
testSetACL()
@expectedException \Sabre\DAV\Exception\Forbidden
testSetName()
@expectedException \Sabre\DAV\Exception\Forbidden @depends testSimple
testDelete()
@expectedException \Sabre\DAV\Exception\Forbidden @depends testSimple
testGetChildNotFound()
@expectedException Sabre\DAV\Exception\NotFound @depends testSimple
testGetSupportedPrivilegesSet()
testCreateExtendedCollectionNotACalendar()
@expectedException Sabre\DAV\Exception\InvalidResourceType @depends testSimple
testCreateDirectory()
@expectedException Sabre\DAV\Exception\MethodNotAllowed @depends testSimple
The CalendarHome represents a node that is usually in a users' calendar-homeset.
This class represents a MKCOL operation.