19 'principaluri' =>
'principals/user1',
23 'principaluri' =>
'principals/user2',
30 $this->calendarObjectUri =
'/calendars/user1/cal/object.ics';
42 DTSTART:20140811T230000Z
43 ORGANIZER:mailto:user1.sabredav@sabredav.org
44 ATTENDEE:mailto:
user2.sabredav@sabredav.org
49 $this->
deliver(null, $newObject);
57 DTSTART:20140811T230000Z
58 ORGANIZER:mailto:user1.sabredav@sabredav.org
59 ATTENDEE;SCHEDULE-STATUS=1.2:mailto:
user2.sabredav@sabredav.org
65 $this->assertVObjectEqualsVObject(
79 DTSTART:20140811T230000Z
80 ORGANIZER:mailto:user1.sabredav@sabredav.org
81 ATTENDEE:mailto:
user2.sabredav@sabredav.org
86 $this->calendarObjectUri =
'/calendars/user1/object.ics';
87 $this->
deliver(null, $newObject);
98 DTSTART:20140811T230000Z
99 ORGANIZER:mailto:user1.sabredav@sabredav.org
100 ATTENDEE:mailto:
user2.sabredav@sabredav.org
105 $this->
deliver(null, $newObject,
true);
115 DTSTART:20140811T230000Z
116 ORGANIZER:mailto:user1.sabredav@sabredav.org
117 ATTENDEE:mailto:
user2.sabredav@sabredav.org
126 DTSTART:20140811T230000Z
127 ORGANIZER:mailto:user1.sabredav@sabredav.org
132 $this->
deliver($oldObject, $newObject);
140 DTSTART:20140811T230000Z
141 ORGANIZER:mailto:user1.sabredav@sabredav.org
142 ATTENDEE;SCHEDULE-STATUS=1.2:mailto:
user2.sabredav@sabredav.org
148 $this->assertVObjectEqualsVObject(
161 DTSTART:20140811T230000Z
162 ORGANIZER:mailto:user1.sabredav@sabredav.org
163 ATTENDEE:mailto:
user2.sabredav@sabredav.org
171 DTSTART:20140811T230000Z
172 ORGANIZER:mailto:user1.sabredav@sabredav.org
177 $this->
deliver($oldObject, $newObject,
true);
188 DTSTART:20140811T230000Z
189 ORGANIZER:mailto:user1.sabredav@sabredav.org
190 ATTENDEE:mailto:
user2.sabredav@sabredav.org
198 DTSTART:20140811T230000Z
199 ORGANIZER:mailto:user1.sabredav@sabredav.org
204 $this->calendarObjectUri =
'/calendars/user1/inbox/foo.ics';
205 $this->
deliver($oldObject, $newObject);
218 DTSTART:20140811T230000Z
219 ORGANIZER:mailto:user1.sabredav@sabredav.org
220 ATTENDEE:mailto:
user2.sabredav@sabredav.org
225 $this->
deliver($oldObject, $newObject);
238 DTSTART:20140811T230000Z
239 ORGANIZER:mailto:user1.sabredav@sabredav.org
240 ATTENDEE:mailto:
user2.sabredav@sabredav.org
245 $this->
deliver($oldObject, $newObject,
true);
264 DTSTART:20140811T230000Z
265 ORGANIZER:mailto:user1.sabredav@sabredav.org
266 ATTENDEE:mailto:
user2.sabredav@sabredav.org
272 $this->server->httpRequest->setMethod(
'MOVE');
273 $this->
deliver($oldObject, $newObject);
286 DTSTART:20140811T230000Z
287 ORGANIZER:mailto:user1.sabredav@sabredav.org
288 ATTENDEE:mailto:
user2.sabredav@sabredav.org
293 $this->calendarObjectUri =
'/calendars/user1/inbox/foo.ics';
294 $this->
deliver($oldObject, $newObject);
305 DTSTART:20140811T230000Z
306 ORGANIZER:mailto:
user2.sabredav@sabredav.org
307 ATTENDEE;PARTSTAT=ACCEPTED:mailto:
user2.sabredav@sabredav.org
308 ATTENDEE:mailto:user1.sabredav@sabredav.org
309 ATTENDEE:mailto:user3.sabredav@sabredav.org
318 DTSTART:20140811T230000Z
319 ORGANIZER:mailto:
user2.sabredav@sabredav.org
320 ATTENDEE;PARTSTAT=ACCEPTED:mailto:
user2.sabredav@sabredav.org
321 ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org
322 ATTENDEE:mailto:user3.sabredav@sabredav.org
327 $this->
putPath(
'calendars/user2/cal/foo.ics', $oldObject);
329 $this->
deliver($oldObject, $newObject);
338 DTSTART:20140811T230000Z
339 ORGANIZER;SCHEDULE-STATUS=1.2:mailto:
user2.sabredav@sabredav.org
340 ATTENDEE;PARTSTAT=ACCEPTED:mailto:
user2.sabredav@sabredav.org
341 ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org
342 ATTENDEE:mailto:user3.sabredav@sabredav.org
348 $this->assertVObjectEqualsVObject(
363 DTSTART:20140811T230000Z
364 ORGANIZER:mailto:user1.sabredav@sabredav.org
365 ATTENDEE:mailto:user3.sabredav@sabredav.org
370 $this->
deliver(null, $newObject);
377 DTSTART:20140811T230000Z
378 ORGANIZER:mailto:user1.sabredav@sabredav.org
379 ATTENDEE;SCHEDULE-STATUS=3.7:mailto:user3.sabredav@sabredav.org
385 $this->assertVObjectEqualsVObject(
398 DTSTART:20140811T230000Z
399 ORGANIZER:mailto:user1.sabredav@sabredav.org
400 ATTENDEE:mailto:
user2.sabredav@sabredav.org
405 $this->server->on(
'propFind',
function($propFind) {
408 $this->
deliver(null, $newObject);
415 DTSTART:20140811T230000Z
416 ORGANIZER:mailto:user1.sabredav@sabredav.org
417 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:
user2.sabredav@sabredav.org
423 $this->assertVObjectEqualsVObject(
436 DTSTART:20140811T230000Z
437 ORGANIZER:mailto:user1.sabredav@sabredav.org
438 ATTENDEE:mailto:
user2.sabredav@sabredav.org
443 $this->server->on(
'propFind',
function($propFind) {
446 $this->
deliver(null, $newObject);
453 DTSTART:20140811T230000Z
454 ORGANIZER:mailto:user1.sabredav@sabredav.org
455 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:
user2.sabredav@sabredav.org
461 $this->assertVObjectEqualsVObject(
473 DTSTART:20140811T230000Z
474 ORGANIZER:mailto:user1.sabredav@sabredav.org
475 ATTENDEE:mailto:
user2.sabredav@sabredav.org
480 $this->server->on(
'propFind',
function($propFind) {
481 $propFind->set(
'{' .
Plugin::NS_CALDAV .
'}schedule-default-calendar-URL', null, 403);
483 $this->
deliver(null, $newObject);
490 DTSTART:20140811T230000Z
491 ORGANIZER:mailto:user1.sabredav@sabredav.org
492 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:
user2.sabredav@sabredav.org
498 $this->assertVObjectEqualsVObject(
510 DTSTART:20140811T230000Z
511 ORGANIZER:mailto:user1.sabredav@sabredav.org
512 ATTENDEE:mailto:
user2.sabredav@sabredav.org
517 $this->server->removeAllListeners(
'schedule');
518 $this->
deliver(null, $newObject);
525 DTSTART:20140811T230000Z
526 ORGANIZER:mailto:user1.sabredav@sabredav.org
527 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:
user2.sabredav@sabredav.org
533 $this->assertVObjectEqualsVObject(
541 $this->setupACL =
false;
548 DTSTART:20140811T230000Z
549 ORGANIZER:mailto:user1.sabredav@sabredav.org
550 ATTENDEE:mailto:
user2.sabredav@sabredav.org
555 $this->
deliver(null, $newObject);
562 DTSTART:20140811T230000Z
563 ORGANIZER:mailto:user1.sabredav@sabredav.org
564 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:
user2.sabredav@sabredav.org
570 $this->assertVObjectEqualsVObject(
579 function deliver($oldObject, &$newObject, $disableScheduling =
false) {
581 $this->server->httpRequest->setUrl($this->calendarObjectUri);
582 if ($disableScheduling) {
583 $this->server->httpRequest->setHeader(
'Schedule-Reply',
'F');
586 if ($oldObject && $newObject) {
588 $this->
putPath($this->calendarObjectUri, $oldObject);
595 $this->server->emit(
'beforeWriteContent', [
596 $this->calendarObjectUri,
597 $this->server->tree->getNodeForPath($this->calendarObjectUri),
605 } elseif ($oldObject && !$newObject) {
607 $this->
putPath($this->calendarObjectUri, $oldObject);
609 $this->caldavSchedulePlugin->beforeUnbind(
610 $this->calendarObjectUri
619 $this->server->emit(
'beforeCreateFile', [
620 $this->calendarObjectUri,
622 $this->server->tree->getNodeForPath(dirname($this->calendarObjectUri)),
646 list($parent,
$base) = \Sabre\HTTP\UrlUtil::splitPath(
$path);
647 $parentNode = $this->server->tree->getNodeForPath($parent);
661 $inboxNode = $this->server->tree->getNodeForPath(
'calendars/' .
$user .
'/inbox');
662 $this->assertEquals($count, count($inboxNode->getChildren()));
testUnbindIgnoredOnMove()
A MOVE request will trigger an unbind on a scheduling resource.
testUpdatedInviteSchedulingDisabled()
assertItemsInInbox($user, $count)
testInviteNoDefaultCalendar()
testUpdatedInviteWrongPath()
$stream
PHP stream implementation.
putPath($path, $data)
Creates or updates a node at the specified path.
testInviteNoCalendarHomeSet()
testNewOnWrongCollection()
This class may be used as a basis for other webdav-related unittests.
testDeletedInviteSchedulingDisabled()
testDeletedInviteWrongUrl()
deliver($oldObject, &$newObject, $disableScheduling=false)
testNewInviteSchedulingDisabled()
const NS_CALDAV
This is the official CalDAV namespace.