Definition at line 8 of file SharedCalendarTest.php.
◆ getInstance()
Sabre\CalDAV\SharedCalendarTest::getInstance |
( |
array |
$props = null | ) |
|
Definition at line 12 of file SharedCalendarTest.php.
Referenced by Sabre\CalDAV\SharedCalendarTest\testGetACL(), Sabre\CalDAV\SharedCalendarTest\testGetChildACL(), Sabre\CalDAV\SharedCalendarTest\testGetInvites(), Sabre\CalDAV\SharedCalendarTest\testGetOwner(), Sabre\CalDAV\SharedCalendarTest\testPublish(), and Sabre\CalDAV\SharedCalendarTest\testUpdateInvites().
14 if (is_null($props)) {
17 '{http://calendarserver.org/ns/}shared-url' =>
'calendars/owner/original',
18 '{http://sabredav.org/ns}owner-principal' =>
'principals/owner',
19 '{http://sabredav.org/ns}read-only' =>
false,
20 'share-access' => Sharing\Plugin::ACCESS_READWRITE,
21 'principaluri' =>
'principals/sharee',
25 $this->backend =
new Backend\MockSharing(
31 $sharee =
new Sharee();
32 $sharee->href =
'mailto:removeme@example.org';
33 $sharee->properties[
'{DAV:}displayname'] =
'To be removed';
34 $sharee->access = Sharing\Plugin::ACCESS_READ;
35 $this->backend->updateInvites(1, [$sharee]);
37 return new SharedCalendar($this->backend, $props);
◆ testGetACL()
Sabre\CalDAV\SharedCalendarTest::testGetACL |
( |
| ) |
|
Definition at line 60 of file SharedCalendarTest.php.
References Sabre\CalDAV\SharedCalendarTest\getInstance(), and Sabre\CalDAV\Plugin\NS_CALDAV.
64 'privilege' =>
'{DAV:}write',
65 'principal' =>
'principals/sharee',
69 'privilege' =>
'{DAV:}write',
70 'principal' =>
'principals/sharee/calendar-proxy-write',
74 'privilege' =>
'{DAV:}write-properties',
75 'principal' =>
'principals/sharee',
79 'privilege' =>
'{DAV:}write-properties',
80 'principal' =>
'principals/sharee/calendar-proxy-write',
84 'privilege' =>
'{DAV:}read',
85 'principal' =>
'principals/sharee',
89 'privilege' =>
'{DAV:}read',
90 'principal' =>
'principals/sharee/calendar-proxy-read',
94 'privilege' =>
'{DAV:}read',
95 'principal' =>
'principals/sharee/calendar-proxy-write',
100 'principal' =>
'{DAV:}authenticated',
105 $this->assertEquals($expected, $this->
getInstance()->getACL());
getInstance(array $props=null)
const NS_CALDAV
This is the official CalDAV namespace.
◆ testGetChildACL()
Sabre\CalDAV\SharedCalendarTest::testGetChildACL |
( |
| ) |
|
Definition at line 109 of file SharedCalendarTest.php.
References Sabre\CalDAV\SharedCalendarTest\getInstance().
113 'privilege' =>
'{DAV:}write',
114 'principal' =>
'principals/sharee',
118 'privilege' =>
'{DAV:}write',
119 'principal' =>
'principals/sharee/calendar-proxy-write',
123 'privilege' =>
'{DAV:}read',
124 'principal' =>
'principals/sharee',
128 'privilege' =>
'{DAV:}read',
129 'principal' =>
'principals/sharee/calendar-proxy-write',
133 'privilege' =>
'{DAV:}read',
134 'principal' =>
'principals/sharee/calendar-proxy-read',
140 $this->assertEquals($expected, $this->
getInstance()->getChildACL());
getInstance(array $props=null)
◆ testGetInvites()
Sabre\CalDAV\SharedCalendarTest::testGetInvites |
( |
| ) |
|
Definition at line 41 of file SharedCalendarTest.php.
References Sabre\CalDAV\SharedCalendarTest\getInstance().
43 $sharee =
new Sharee();
44 $sharee->href =
'mailto:removeme@example.org';
45 $sharee->properties[
'{DAV:}displayname'] =
'To be removed';
46 $sharee->access = Sharing\Plugin::ACCESS_READ;
47 $sharee->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE;
getInstance(array $props=null)
◆ testGetOwner()
Sabre\CalDAV\SharedCalendarTest::testGetOwner |
( |
| ) |
|
◆ testPublish()
Sabre\CalDAV\SharedCalendarTest::testPublish |
( |
| ) |
|
◆ testUpdateInvites()
Sabre\CalDAV\SharedCalendarTest::testUpdateInvites |
( |
| ) |
|
Definition at line 144 of file SharedCalendarTest.php.
References Sabre\CalDAV\SharedCalendarTest\getInstance().
151 $newSharees[0]->href =
'mailto:test@example.org';
152 $newSharees[0]->properties[
'{DAV:}displayname'] =
'Foo Bar';
153 $newSharees[0]->comment =
'Booh';
154 $newSharees[0]->access = Sharing\Plugin::ACCESS_READWRITE;
156 $newSharees[1]->href =
'mailto:removeme@example.org';
157 $newSharees[1]->access = Sharing\Plugin::ACCESS_NOACCESS;
159 $instance->updateInvites($newSharees);
164 $expected[0]->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE;
165 $this->assertEquals($expected, $instance->getInvites());
getInstance(array $props=null)
◆ $backend
Sabre\CalDAV\SharedCalendarTest::$backend |
|
protected |
The documentation for this class was generated from the following file: