ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Schedule\ScheduleDeliverTest Class Reference
+ Inheritance diagram for Sabre\CalDAV\Schedule\ScheduleDeliverTest:
+ Collaboration diagram for Sabre\CalDAV\Schedule\ScheduleDeliverTest:

Public Member Functions

 setUp ()
 
 testNewInvite ()
 
 testNewOnWrongCollection ()
 
 testNewInviteSchedulingDisabled ()
 
 testUpdatedInvite ()
 
 testUpdatedInviteSchedulingDisabled ()
 
 testUpdatedInviteWrongPath ()
 
 testDeletedInvite ()
 
 testDeletedInviteSchedulingDisabled ()
 
 testUnbindIgnoredOnMove ()
 A MOVE request will trigger an unbind on a scheduling resource. More...
 
 testDeletedInviteWrongUrl ()
 
 testReply ()
 
 testInviteUnknownUser ()
 
 testInviteNoInboxUrl ()
 
 testInviteNoCalendarHomeSet ()
 
 testInviteNoDefaultCalendar ()
 
 testInviteNoScheduler ()
 
 testInviteNoACLPlugin ()
 
 deliver ($oldObject, &$newObject, $disableScheduling=false)
 
 putPath ($path, $data)
 Creates or updates a node at the specified path. More...
 
 assertItemsInInbox ($user, $count)
 
- Public Member Functions inherited from Sabre\DAVServerTest
 setUp ()
 
 initializeEverything ()
 
 request ($request, $expectedStatus=null)
 Makes a request, and returns a response object. More...
 
 autoLogin ($userName)
 This function takes a username and sets the server in a state where this user is logged in, and no longer requires an authentication check. More...
 
 setUpTree ()
 Override this to provide your own Tree for your test-case. More...
 
 setUpBackends ()
 
 assertHttpStatus ($expectedStatus, HTTP\Request $req)
 

Data Fields

 $setupCalDAV = true
 
 $setupCalDAVScheduling = true
 
 $setupACL = true
 
 $autoLogin = 'user1'
 
 $caldavCalendars
 

Protected Attributes

 $calendarObjectUri
 
- Protected Attributes inherited from Sabre\DAVServerTest
 $setupCalDAV = false
 
 $setupCardDAV = false
 
 $setupACL = false
 
 $setupCalDAVSharing = false
 
 $setupCalDAVScheduling = false
 
 $setupCalDAVSubscriptions = false
 
 $setupCalDAVICSExport = false
 
 $setupLocks = false
 
 $setupFiles = false
 
 $setupSharing = false
 
 $setupPropertyStorage = false
 
 $caldavCalendars = []
 An array with calendars. More...
 
 $caldavCalendarObjects = []
 
 $carddavAddressBooks = []
 
 $carddavCards = []
 
 $server
 
 $tree = []
 
 $caldavBackend
 
 $carddavBackend
 
 $principalBackend
 
 $locksBackend
 
 $propertyStorageBackend
 
 $caldavPlugin
 
 $carddavPlugin
 
 $aclPlugin
 
 $caldavSharingPlugin
 
 $caldavSchedulePlugin
 
 $authPlugin
 
 $locksPlugin
 
 $sharingPlugin
 
 $propertyStoragePlugin
 
 $autoLogin = null
 If this string is set, we will automatically log in the user with this name. More...
 

Detailed Description

Definition at line 8 of file ScheduleDeliverTest.php.

Member Function Documentation

◆ assertItemsInInbox()

◆ deliver()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::deliver (   $oldObject,
$newObject,
  $disableScheduling = false 
)

Definition at line 579 of file ScheduleDeliverTest.php.

References GuzzleHttp\Psr7\$stream, and Sabre\CalDAV\Schedule\ScheduleDeliverTest\putPath().

Referenced by Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInviteSchedulingDisabled(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInviteWrongUrl(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoACLPlugin(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoCalendarHomeSet(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoDefaultCalendar(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoInboxUrl(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoScheduler(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteUnknownUser(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewInviteSchedulingDisabled(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewOnWrongCollection(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testReply(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUnbindIgnoredOnMove(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInviteSchedulingDisabled(), and Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInviteWrongPath().

579  {
580 
581  $this->server->httpRequest->setUrl($this->calendarObjectUri);
582  if ($disableScheduling) {
583  $this->server->httpRequest->setHeader('Schedule-Reply', 'F');
584  }
585 
586  if ($oldObject && $newObject) {
587  // update
588  $this->putPath($this->calendarObjectUri, $oldObject);
589 
590  $stream = fopen('php://memory', 'r+');
591  fwrite($stream, $newObject);
592  rewind($stream);
593  $modified = false;
594 
595  $this->server->emit('beforeWriteContent', [
596  $this->calendarObjectUri,
597  $this->server->tree->getNodeForPath($this->calendarObjectUri),
598  &$stream,
599  &$modified
600  ]);
601  if ($modified) {
602  $newObject = $stream;
603  }
604 
605  } elseif ($oldObject && !$newObject) {
606  // delete
607  $this->putPath($this->calendarObjectUri, $oldObject);
608 
609  $this->caldavSchedulePlugin->beforeUnbind(
610  $this->calendarObjectUri
611  );
612  } else {
613 
614  // create
615  $stream = fopen('php://memory', 'r+');
616  fwrite($stream, $newObject);
617  rewind($stream);
618  $modified = false;
619  $this->server->emit('beforeCreateFile', [
620  $this->calendarObjectUri,
621  &$stream,
622  $this->server->tree->getNodeForPath(dirname($this->calendarObjectUri)),
623  &$modified
624  ]);
625 
626  if ($modified) {
627  $newObject = $stream;
628  }
629  }
630 
631  }
$stream
PHP stream implementation.
putPath($path, $data)
Creates or updates a node at the specified path.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ putPath()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::putPath (   $path,
  $data 
)

Creates or updates a node at the specified path.

This circumvents sabredav's internal server apis, so all events and access control is skipped.

Parameters
string$path
string$data
Returns
void

Definition at line 644 of file ScheduleDeliverTest.php.

References $base, $data, and $path.

Referenced by Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and Sabre\CalDAV\Schedule\ScheduleDeliverTest\testReply().

644  {
645 
646  list($parent, $base) = \Sabre\HTTP\UrlUtil::splitPath($path);
647  $parentNode = $this->server->tree->getNodeForPath($parent);
648 
649  /*
650  if ($parentNode->childExists($base)) {
651  $childNode = $parentNode->getChild($base);
652  $childNode->put($data);
653  } else {*/
654  $parentNode->createFile($base, $data);
655  //}
656 
657  }
$path
Definition: aliased.php:25
$base
Definition: index.php:4
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

◆ setUp()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::setUp ( )

Definition at line 28 of file ScheduleDeliverTest.php.

28  {
29 
30  $this->calendarObjectUri = '/calendars/user1/cal/object.ics';
31 
32  parent::setUp();
33 
34  }

◆ testDeletedInvite()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testDeletedInvite ( )

Definition at line 210 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

210  {
211 
212  $newObject = null;
213 
214  $oldObject = <<<ICS
215 BEGIN:VCALENDAR
216 BEGIN:VEVENT
217 UID:foo
218 DTSTART:20140811T230000Z
219 ORGANIZER:mailto:user1.sabredav@sabredav.org
220 ATTENDEE:mailto:user2.sabredav@sabredav.org
221 END:VEVENT
222 END:VCALENDAR
223 ICS;
224 
225  $this->deliver($oldObject, $newObject);
226  $this->assertItemsInInbox('user2', 1);
227 
228  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testDeletedInviteSchedulingDisabled()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testDeletedInviteSchedulingDisabled ( )

Definition at line 230 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

230  {
231 
232  $newObject = null;
233 
234  $oldObject = <<<ICS
235 BEGIN:VCALENDAR
236 BEGIN:VEVENT
237 UID:foo
238 DTSTART:20140811T230000Z
239 ORGANIZER:mailto:user1.sabredav@sabredav.org
240 ATTENDEE:mailto:user2.sabredav@sabredav.org
241 END:VEVENT
242 END:VCALENDAR
243 ICS;
244 
245  $this->deliver($oldObject, $newObject, true);
246  $this->assertItemsInInbox('user2', 0);
247 
248  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testDeletedInviteWrongUrl()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testDeletedInviteWrongUrl ( )

Definition at line 278 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

278  {
279 
280  $newObject = null;
281 
282  $oldObject = <<<ICS
283 BEGIN:VCALENDAR
284 BEGIN:VEVENT
285 UID:foo
286 DTSTART:20140811T230000Z
287 ORGANIZER:mailto:user1.sabredav@sabredav.org
288 ATTENDEE:mailto:user2.sabredav@sabredav.org
289 END:VEVENT
290 END:VCALENDAR
291 ICS;
292 
293  $this->calendarObjectUri = '/calendars/user1/inbox/foo.ics';
294  $this->deliver($oldObject, $newObject);
295  $this->assertItemsInInbox('user2', 0);
296 
297  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testInviteNoACLPlugin()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteNoACLPlugin ( )

Definition at line 539 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

539  {
540 
541  $this->setupACL = false;
542  parent::setUp();
543 
544  $newObject = <<<ICS
545 BEGIN:VCALENDAR
546 BEGIN:VEVENT
547 UID:foo
548 DTSTART:20140811T230000Z
549 ORGANIZER:mailto:user1.sabredav@sabredav.org
550 ATTENDEE:mailto:user2.sabredav@sabredav.org
551 END:VEVENT
552 END:VCALENDAR
553 ICS;
554 
555  $this->deliver(null, $newObject);
556 
557  $expected = <<<ICS
558 BEGIN:VCALENDAR
559 VERSION:2.0
560 BEGIN:VEVENT
561 UID:foo
562 DTSTART:20140811T230000Z
563 ORGANIZER:mailto:user1.sabredav@sabredav.org
564 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
565 DTSTAMP:**ANY**
566 END:VEVENT
567 END:VCALENDAR
568 ICS;
569 
570  $this->assertVObjectEqualsVObject(
571  $expected,
572  $newObject
573  );
574 
575  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testInviteNoCalendarHomeSet()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteNoCalendarHomeSet ( )

Definition at line 430 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), Sabre\CalDAV\Plugin\NS_CALDAV, and user2.

430  {
431 
432  $newObject = <<<ICS
433 BEGIN:VCALENDAR
434 BEGIN:VEVENT
435 UID:foo
436 DTSTART:20140811T230000Z
437 ORGANIZER:mailto:user1.sabredav@sabredav.org
438 ATTENDEE:mailto:user2.sabredav@sabredav.org
439 END:VEVENT
440 END:VCALENDAR
441 ICS;
442 
443  $this->server->on('propFind', function($propFind) {
444  $propFind->set('{' . Plugin::NS_CALDAV . '}calendar-home-set', null, 403);
445  });
446  $this->deliver(null, $newObject);
447 
448  $expected = <<<ICS
449 BEGIN:VCALENDAR
450 VERSION:2.0
451 BEGIN:VEVENT
452 UID:foo
453 DTSTART:20140811T230000Z
454 ORGANIZER:mailto:user1.sabredav@sabredav.org
455 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
456 DTSTAMP:**ANY**
457 END:VEVENT
458 END:VCALENDAR
459 ICS;
460 
461  $this->assertVObjectEqualsVObject(
462  $expected,
463  $newObject
464  );
465 
466  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33
+ Here is the call graph for this function:

◆ testInviteNoDefaultCalendar()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteNoDefaultCalendar ( )

Definition at line 467 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), Sabre\CalDAV\Plugin\NS_CALDAV, and user2.

467  {
468 
469  $newObject = <<<ICS
470 BEGIN:VCALENDAR
471 BEGIN:VEVENT
472 UID:foo
473 DTSTART:20140811T230000Z
474 ORGANIZER:mailto:user1.sabredav@sabredav.org
475 ATTENDEE:mailto:user2.sabredav@sabredav.org
476 END:VEVENT
477 END:VCALENDAR
478 ICS;
479 
480  $this->server->on('propFind', function($propFind) {
481  $propFind->set('{' . Plugin::NS_CALDAV . '}schedule-default-calendar-URL', null, 403);
482  });
483  $this->deliver(null, $newObject);
484 
485  $expected = <<<ICS
486 BEGIN:VCALENDAR
487 VERSION:2.0
488 BEGIN:VEVENT
489 UID:foo
490 DTSTART:20140811T230000Z
491 ORGANIZER:mailto:user1.sabredav@sabredav.org
492 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
493 DTSTAMP:**ANY**
494 END:VEVENT
495 END:VCALENDAR
496 ICS;
497 
498  $this->assertVObjectEqualsVObject(
499  $expected,
500  $newObject
501  );
502 
503  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33
+ Here is the call graph for this function:

◆ testInviteNoInboxUrl()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteNoInboxUrl ( )

Definition at line 392 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), Sabre\CalDAV\Plugin\NS_CALDAV, and user2.

392  {
393 
394  $newObject = <<<ICS
395 BEGIN:VCALENDAR
396 BEGIN:VEVENT
397 UID:foo
398 DTSTART:20140811T230000Z
399 ORGANIZER:mailto:user1.sabredav@sabredav.org
400 ATTENDEE:mailto:user2.sabredav@sabredav.org
401 END:VEVENT
402 END:VCALENDAR
403 ICS;
404 
405  $this->server->on('propFind', function($propFind) {
406  $propFind->set('{' . Plugin::NS_CALDAV . '}schedule-inbox-URL', null, 403);
407  });
408  $this->deliver(null, $newObject);
409 
410  $expected = <<<ICS
411 BEGIN:VCALENDAR
412 VERSION:2.0
413 BEGIN:VEVENT
414 UID:foo
415 DTSTART:20140811T230000Z
416 ORGANIZER:mailto:user1.sabredav@sabredav.org
417 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
418 DTSTAMP:**ANY**
419 END:VEVENT
420 END:VCALENDAR
421 ICS;
422 
423  $this->assertVObjectEqualsVObject(
424  $expected,
425  $newObject
426  );
427 
428  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33
+ Here is the call graph for this function:

◆ testInviteNoScheduler()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteNoScheduler ( )

Definition at line 504 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

504  {
505 
506  $newObject = <<<ICS
507 BEGIN:VCALENDAR
508 BEGIN:VEVENT
509 UID:foo
510 DTSTART:20140811T230000Z
511 ORGANIZER:mailto:user1.sabredav@sabredav.org
512 ATTENDEE:mailto:user2.sabredav@sabredav.org
513 END:VEVENT
514 END:VCALENDAR
515 ICS;
516 
517  $this->server->removeAllListeners('schedule');
518  $this->deliver(null, $newObject);
519 
520  $expected = <<<ICS
521 BEGIN:VCALENDAR
522 VERSION:2.0
523 BEGIN:VEVENT
524 UID:foo
525 DTSTART:20140811T230000Z
526 ORGANIZER:mailto:user1.sabredav@sabredav.org
527 ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
528 DTSTAMP:**ANY**
529 END:VEVENT
530 END:VCALENDAR
531 ICS;
532 
533  $this->assertVObjectEqualsVObject(
534  $expected,
535  $newObject
536  );
537 
538  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testInviteUnknownUser()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testInviteUnknownUser ( )

Definition at line 357 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver().

357  {
358 
359  $newObject = <<<ICS
360 BEGIN:VCALENDAR
361 BEGIN:VEVENT
362 UID:foo
363 DTSTART:20140811T230000Z
364 ORGANIZER:mailto:user1.sabredav@sabredav.org
365 ATTENDEE:mailto:user3.sabredav@sabredav.org
366 END:VEVENT
367 END:VCALENDAR
368 ICS;
369 
370  $this->deliver(null, $newObject);
371 
372  $expected = <<<ICS
373 BEGIN:VCALENDAR
374 VERSION:2.0
375 BEGIN:VEVENT
376 UID:foo
377 DTSTART:20140811T230000Z
378 ORGANIZER:mailto:user1.sabredav@sabredav.org
379 ATTENDEE;SCHEDULE-STATUS=3.7:mailto:user3.sabredav@sabredav.org
380 DTSTAMP:**ANY**
381 END:VEVENT
382 END:VCALENDAR
383 ICS;
384 
385  $this->assertVObjectEqualsVObject(
386  $expected,
387  $newObject
388  );
389 
390  }
deliver($oldObject, &$newObject, $disableScheduling=false)
+ Here is the call graph for this function:

◆ testNewInvite()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testNewInvite ( )

Definition at line 36 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

36  {
37 
38  $newObject = <<<ICS
39 BEGIN:VCALENDAR
40 BEGIN:VEVENT
41 UID:foo
42 DTSTART:20140811T230000Z
43 ORGANIZER:mailto:user1.sabredav@sabredav.org
44 ATTENDEE:mailto:user2.sabredav@sabredav.org
45 END:VEVENT
46 END:VCALENDAR
47 ICS;
48 
49  $this->deliver(null, $newObject);
50  $this->assertItemsInInbox('user2', 1);
51 
52  $expected = <<<ICS
53 BEGIN:VCALENDAR
54 VERSION:2.0
55 BEGIN:VEVENT
56 UID:foo
57 DTSTART:20140811T230000Z
58 ORGANIZER:mailto:user1.sabredav@sabredav.org
59 ATTENDEE;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org
60 DTSTAMP:**ANY**
61 END:VEVENT
62 END:VCALENDAR
63 ICS;
64 
65  $this->assertVObjectEqualsVObject(
66  $expected,
67  $newObject
68  );
69 
70  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testNewInviteSchedulingDisabled()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testNewInviteSchedulingDisabled ( )

Definition at line 92 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

92  {
93 
94  $newObject = <<<ICS
95 BEGIN:VCALENDAR
96 BEGIN:VEVENT
97 UID:foo
98 DTSTART:20140811T230000Z
99 ORGANIZER:mailto:user1.sabredav@sabredav.org
100 ATTENDEE:mailto:user2.sabredav@sabredav.org
101 END:VEVENT
102 END:VCALENDAR
103 ICS;
104 
105  $this->deliver(null, $newObject, true);
106  $this->assertItemsInInbox('user2', 0);
107 
108  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testNewOnWrongCollection()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testNewOnWrongCollection ( )

Definition at line 72 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

72  {
73 
74  $newObject = <<<ICS
75 BEGIN:VCALENDAR
76 VERSION:2.0
77 BEGIN:VEVENT
78 UID:foo
79 DTSTART:20140811T230000Z
80 ORGANIZER:mailto:user1.sabredav@sabredav.org
81 ATTENDEE:mailto:user2.sabredav@sabredav.org
82 END:VEVENT
83 END:VCALENDAR
84 ICS;
85 
86  $this->calendarObjectUri = '/calendars/user1/object.ics';
87  $this->deliver(null, $newObject);
88  $this->assertItemsInInbox('user2', 0);
89 
90 
91  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testReply()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testReply ( )

Definition at line 299 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\putPath(), and user2.

299  {
300 
301  $oldObject = <<<ICS
302 BEGIN:VCALENDAR
303 BEGIN:VEVENT
304 UID:foo
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
310 END:VEVENT
311 END:VCALENDAR
312 ICS;
313 
314  $newObject = <<<ICS
315 BEGIN:VCALENDAR
316 BEGIN:VEVENT
317 UID:foo
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
323 END:VEVENT
324 END:VCALENDAR
325 ICS;
326 
327  $this->putPath('calendars/user2/cal/foo.ics', $oldObject);
328 
329  $this->deliver($oldObject, $newObject);
330  $this->assertItemsInInbox('user2', 1);
331  $this->assertItemsInInbox('user1', 0);
332 
333  $expected = <<<ICS
334 BEGIN:VCALENDAR
335 VERSION:2.0
336 BEGIN:VEVENT
337 UID:foo
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
343 DTSTAMP:**ANY**
344 END:VEVENT
345 END:VCALENDAR
346 ICS;
347 
348  $this->assertVObjectEqualsVObject(
349  $expected,
350  $newObject
351  );
352 
353  }
putPath($path, $data)
Creates or updates a node at the specified path.
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testUnbindIgnoredOnMove()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testUnbindIgnoredOnMove ( )

A MOVE request will trigger an unbind on a scheduling resource.

However, we must not treat it as a cancellation, it just got moved to a different calendar.

Definition at line 256 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

256  {
257 
258  $newObject = null;
259 
260  $oldObject = <<<ICS
261 BEGIN:VCALENDAR
262 BEGIN:VEVENT
263 UID:foo
264 DTSTART:20140811T230000Z
265 ORGANIZER:mailto:user1.sabredav@sabredav.org
266 ATTENDEE:mailto:user2.sabredav@sabredav.org
267 END:VEVENT
268 END:VCALENDAR
269 ICS;
270 
271 
272  $this->server->httpRequest->setMethod('MOVE');
273  $this->deliver($oldObject, $newObject);
274  $this->assertItemsInInbox('user2', 0);
275 
276  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testUpdatedInvite()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testUpdatedInvite ( )

Definition at line 109 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

109  {
110 
111  $newObject = <<<ICS
112 BEGIN:VCALENDAR
113 BEGIN:VEVENT
114 UID:foo
115 DTSTART:20140811T230000Z
116 ORGANIZER:mailto:user1.sabredav@sabredav.org
117 ATTENDEE:mailto:user2.sabredav@sabredav.org
118 END:VEVENT
119 END:VCALENDAR
120 ICS;
121  $oldObject = <<<ICS
122 BEGIN:VCALENDAR
123 VERSION:2.0
124 BEGIN:VEVENT
125 UID:foo
126 DTSTART:20140811T230000Z
127 ORGANIZER:mailto:user1.sabredav@sabredav.org
128 END:VEVENT
129 END:VCALENDAR
130 ICS;
131 
132  $this->deliver($oldObject, $newObject);
133  $this->assertItemsInInbox('user2', 1);
134 
135  $expected = <<<ICS
136 BEGIN:VCALENDAR
137 VERSION:2.0
138 BEGIN:VEVENT
139 UID:foo
140 DTSTART:20140811T230000Z
141 ORGANIZER:mailto:user1.sabredav@sabredav.org
142 ATTENDEE;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org
143 DTSTAMP:**ANY**
144 END:VEVENT
145 END:VCALENDAR
146 ICS;
147 
148  $this->assertVObjectEqualsVObject(
149  $expected,
150  $newObject
151  );
152 
153 
154  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testUpdatedInviteSchedulingDisabled()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testUpdatedInviteSchedulingDisabled ( )

Definition at line 155 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

155  {
156 
157  $newObject = <<<ICS
158 BEGIN:VCALENDAR
159 BEGIN:VEVENT
160 UID:foo
161 DTSTART:20140811T230000Z
162 ORGANIZER:mailto:user1.sabredav@sabredav.org
163 ATTENDEE:mailto:user2.sabredav@sabredav.org
164 END:VEVENT
165 END:VCALENDAR
166 ICS;
167  $oldObject = <<<ICS
168 BEGIN:VCALENDAR
169 BEGIN:VEVENT
170 UID:foo
171 DTSTART:20140811T230000Z
172 ORGANIZER:mailto:user1.sabredav@sabredav.org
173 END:VEVENT
174 END:VCALENDAR
175 ICS;
176 
177  $this->deliver($oldObject, $newObject, true);
178  $this->assertItemsInInbox('user2', 0);
179 
180  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

◆ testUpdatedInviteWrongPath()

Sabre\CalDAV\Schedule\ScheduleDeliverTest::testUpdatedInviteWrongPath ( )

Definition at line 182 of file ScheduleDeliverTest.php.

References Sabre\CalDAV\Schedule\ScheduleDeliverTest\assertItemsInInbox(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), and user2.

182  {
183 
184  $newObject = <<<ICS
185 BEGIN:VCALENDAR
186 BEGIN:VEVENT
187 UID:foo
188 DTSTART:20140811T230000Z
189 ORGANIZER:mailto:user1.sabredav@sabredav.org
190 ATTENDEE:mailto:user2.sabredav@sabredav.org
191 END:VEVENT
192 END:VCALENDAR
193 ICS;
194  $oldObject = <<<ICS
195 BEGIN:VCALENDAR
196 BEGIN:VEVENT
197 UID:foo
198 DTSTART:20140811T230000Z
199 ORGANIZER:mailto:user1.sabredav@sabredav.org
200 END:VEVENT
201 END:VCALENDAR
202 ICS;
203 
204  $this->calendarObjectUri = '/calendars/user1/inbox/foo.ics';
205  $this->deliver($oldObject, $newObject);
206  $this->assertItemsInInbox('user2', 0);
207 
208  }
deliver($oldObject, &$newObject, $disableScheduling=false)
user2
Definition: basicauth.php:12
+ Here is the call graph for this function:

Field Documentation

◆ $autoLogin

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$autoLogin = 'user1'

Definition at line 15 of file ScheduleDeliverTest.php.

◆ $caldavCalendars

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$caldavCalendars
Initial value:
= [
[
'principaluri' => 'principals/user1',
'uri' => 'cal'

Definition at line 17 of file ScheduleDeliverTest.php.

◆ $calendarObjectUri

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$calendarObjectUri
protected

Definition at line 577 of file ScheduleDeliverTest.php.

◆ $setupACL

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$setupACL = true

Definition at line 14 of file ScheduleDeliverTest.php.

◆ $setupCalDAV

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$setupCalDAV = true

Definition at line 12 of file ScheduleDeliverTest.php.

◆ $setupCalDAVScheduling

Sabre\CalDAV\Schedule\ScheduleDeliverTest::$setupCalDAVScheduling = true

Definition at line 13 of file ScheduleDeliverTest.php.


The documentation for this class was generated from the following file: