7 require_once
'Sabre/CalDAV/TestUtil.php';
29 $this->calendars = $this->backend->getCalendarsForUser(
'principals/user1');
30 $this->assertEquals(2, count($this->calendars));
31 $this->calendar =
new Calendar($this->backend, $this->calendars[0]);
38 unset($this->backend);
44 $this->assertEquals($this->calendars[0][
'uri'], $this->calendar->getName());
54 '{DAV:}displayname' =>
'NewName',
57 $result = $this->calendar->propPatch($propPatch);
60 $this->assertEquals(
true,
$result);
62 $calendars2 = $this->backend->getCalendarsForUser(
'principals/user1');
63 $this->assertEquals(
'NewName', $calendars2[0][
'{DAV:}displayname']);
73 '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set',
76 $result = $this->calendar->getProperties($question);
78 foreach ($question as $q) $this->assertArrayHasKey($q,
$result);
80 $this->assertEquals([
'VEVENT',
'VTODO'],
$result[
'{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']->getValue());
90 $this->calendar->getChild(
'randomname');
99 $children = $this->calendar->getChildren();
100 $this->assertEquals(1, count($children));
111 $this->assertFalse($this->calendar->childExists(
'foo'));
113 $children = $this->calendar->getChildren();
114 $this->assertTrue($this->calendar->childExists($children[0]->getName()));
124 $this->calendar->createDirectory(
'hello');
133 $this->calendar->setName(
'hello');
139 $this->assertNull($this->calendar->getLastModified());
145 $file =
fopen(
'php://memory',
'r+');
149 $this->calendar->createFile(
'hello', $file);
151 $file = $this->calendar->getChild(
'hello');
158 $file =
fopen(
'php://memory',
'r+');
172 $this->calendar->delete();
174 $calendars = $this->backend->getCalendarsForUser(
'principals/user1');
180 $this->assertEquals(
'principals/user1', $this->calendar->getOwner());
186 $this->assertNull($this->calendar->getGroup());
194 'privilege' =>
'{DAV:}read',
195 'principal' =>
'principals/user1',
199 'privilege' =>
'{DAV:}read',
200 'principal' =>
'principals/user1/calendar-proxy-write',
204 'privilege' =>
'{DAV:}read',
205 'principal' =>
'principals/user1/calendar-proxy-read',
210 'principal' =>
'{DAV:}authenticated',
214 'privilege' =>
'{DAV:}write',
215 'principal' =>
'principals/user1',
219 'privilege' =>
'{DAV:}write',
220 'principal' =>
'principals/user1/calendar-proxy-write',
224 $this->assertEquals($expected, $this->calendar->getACL());
233 $this->calendar->setACL([]);
239 $this->assertNull($this->calendar->getSyncToken());
246 $this->assertNull(
$calendar->getSyncToken());
252 $this->assertNull($this->calendar->getChanges(1, 1));
testGetSyncTokenNoSyncSupport()
This class represents a set of properties that are going to be updated.
testCreateFileNoSupportedComponents()
testGetChildNotFound()
Sabre testSimple
testGetChildren()
testSimple
testChildExists()
testGetChildren
static getTestCalendarData($type=1)
testCreateDirectory()
Sabre
The CalendarObject represents a single VEVENT or VTODO within a Calendar.
testUpdateProperties()
testSimple
This object represents a CalDAV calendar.
testGetProperties()
testSimple
const NS_CALDAV
This is the official CalDAV namespace.