14 $caldavBackend = new \Sabre\CalDAV\Backend\MockSubscriptionSupport([], []);
17 '{http://calendarserver.org/ns/}source' =>
new Href(
'http://example.org/src',
false),
18 'lastmodified' => date(
'2013-04-06 11:40:00'),
19 '{DAV:}displayname' =>
'displayname',
24 $subInfo =
$caldavBackend->getSubscriptionsForUser(
'principals/user1');
26 $this->assertEquals(1, count($subInfo));
38 $this->assertEquals(
'uri', $sub->getName());
39 $this->assertEquals(date(
'2013-04-06 11:40:00'), $sub->getLastModified());
40 $this->assertEquals([], $sub->getChildren());
44 '{DAV:}displayname' =>
'displayname',
45 '{http://calendarserver.org/ns/}source' =>
new Href(
'http://example.org/src',
false),
47 $sub->getProperties([
'{DAV:}displayname',
'{http://calendarserver.org/ns/}source'])
50 $this->assertEquals(
'principals/user1', $sub->getOwner());
51 $this->assertNull($sub->getGroup());
55 'privilege' =>
'{DAV:}all',
56 'principal' =>
'principals/user1',
60 'privilege' =>
'{DAV:}all',
61 'principal' =>
'principals/user1/calendar-proxy-write',
65 'privilege' =>
'{DAV:}read',
66 'principal' =>
'principals/user1/calendar-proxy-read',
70 $this->assertEquals($acl, $sub->getACL());
72 $this->assertNull($sub->getSupportedPrivilegeSet());
79 'lastmodified' => null,
82 $this->assertEquals(null, $sub->getLastModified());
101 $this->assertEquals([], $this->backend->getSubscriptionsForUser(
'principals1/user1'));
109 '{DAV:}displayname' =>
'foo',
111 $sub->propPatch($propPatch);
112 $this->assertTrue($propPatch->commit());
116 $this->backend->getSubscriptionsForUser(
'principals/user1')[0][
'{DAV:}displayname']
126 $caldavBackend = new \Sabre\CalDAV\Backend\MockSubscriptionSupport([], []);
This class represents a set of properties that are going to be updated.
if(!array_key_exists('StateId', $_REQUEST)) $id