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.

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 }
putPath($path, $data)
Creates or updates a node at the specified path.
$stream
PHP stream implementation.

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().

+ 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.

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

References $base, $data, and $path.

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

+ Here is the caller graph for this function:

◆ setUp()

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

Reimplemented from Sabre\DAVServerTest.

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.

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

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

+ Here is the call graph for this function:

◆ testDeletedInviteSchedulingDisabled()

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

Definition at line 230 of file ScheduleDeliverTest.php.

230 {
231
232 $newObject = null;
233
234 $oldObject = <<<ICS
235BEGIN:VCALENDAR
236BEGIN:VEVENT
237UID:foo
238DTSTART:20140811T230000Z
239ORGANIZER:mailto:user1.sabredav@sabredav.org
240ATTENDEE:mailto:user2.sabredav@sabredav.org
241END:VEVENT
242END:VCALENDAR
243ICS;
244
245 $this->deliver($oldObject, $newObject, true);
246 $this->assertItemsInInbox('user2', 0);
247
248 }

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

+ Here is the call graph for this function:

◆ testDeletedInviteWrongUrl()

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

Definition at line 278 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testInviteNoACLPlugin()

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

Definition at line 539 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testInviteNoCalendarHomeSet()

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

Definition at line 430 of file ScheduleDeliverTest.php.

430 {
431
432 $newObject = <<<ICS
433BEGIN:VCALENDAR
434BEGIN:VEVENT
435UID:foo
436DTSTART:20140811T230000Z
437ORGANIZER:mailto:user1.sabredav@sabredav.org
438ATTENDEE:mailto:user2.sabredav@sabredav.org
439END:VEVENT
440END:VCALENDAR
441ICS;
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
449BEGIN:VCALENDAR
450VERSION:2.0
451BEGIN:VEVENT
452UID:foo
453DTSTART:20140811T230000Z
454ORGANIZER:mailto:user1.sabredav@sabredav.org
455ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
456DTSTAMP:**ANY**
457END:VEVENT
458END:VCALENDAR
459ICS;
460
461 $this->assertVObjectEqualsVObject(
462 $expected,
463 $newObject
464 );
465
466 }
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33

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

+ Here is the call graph for this function:

◆ testInviteNoDefaultCalendar()

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

Definition at line 467 of file ScheduleDeliverTest.php.

467 {
468
469 $newObject = <<<ICS
470BEGIN:VCALENDAR
471BEGIN:VEVENT
472UID:foo
473DTSTART:20140811T230000Z
474ORGANIZER:mailto:user1.sabredav@sabredav.org
475ATTENDEE:mailto:user2.sabredav@sabredav.org
476END:VEVENT
477END:VCALENDAR
478ICS;
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
486BEGIN:VCALENDAR
487VERSION:2.0
488BEGIN:VEVENT
489UID:foo
490DTSTART:20140811T230000Z
491ORGANIZER:mailto:user1.sabredav@sabredav.org
492ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
493DTSTAMP:**ANY**
494END:VEVENT
495END:VCALENDAR
496ICS;
497
498 $this->assertVObjectEqualsVObject(
499 $expected,
500 $newObject
501 );
502
503 }

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

+ Here is the call graph for this function:

◆ testInviteNoInboxUrl()

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

Definition at line 392 of file ScheduleDeliverTest.php.

392 {
393
394 $newObject = <<<ICS
395BEGIN:VCALENDAR
396BEGIN:VEVENT
397UID:foo
398DTSTART:20140811T230000Z
399ORGANIZER:mailto:user1.sabredav@sabredav.org
400ATTENDEE:mailto:user2.sabredav@sabredav.org
401END:VEVENT
402END:VCALENDAR
403ICS;
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
411BEGIN:VCALENDAR
412VERSION:2.0
413BEGIN:VEVENT
414UID:foo
415DTSTART:20140811T230000Z
416ORGANIZER:mailto:user1.sabredav@sabredav.org
417ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org
418DTSTAMP:**ANY**
419END:VEVENT
420END:VCALENDAR
421ICS;
422
423 $this->assertVObjectEqualsVObject(
424 $expected,
425 $newObject
426 );
427
428 }

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

+ Here is the call graph for this function:

◆ testInviteNoScheduler()

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

Definition at line 504 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testInviteUnknownUser()

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

Definition at line 357 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testNewInvite()

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

Definition at line 36 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testNewInviteSchedulingDisabled()

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

Definition at line 92 of file ScheduleDeliverTest.php.

92 {
93
94 $newObject = <<<ICS
95BEGIN:VCALENDAR
96BEGIN:VEVENT
97UID:foo
98DTSTART:20140811T230000Z
99ORGANIZER:mailto:user1.sabredav@sabredav.org
100ATTENDEE:mailto:user2.sabredav@sabredav.org
101END:VEVENT
102END:VCALENDAR
103ICS;
104
105 $this->deliver(null, $newObject, true);
106 $this->assertItemsInInbox('user2', 0);
107
108 }

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

+ Here is the call graph for this function:

◆ testNewOnWrongCollection()

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

Definition at line 72 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testReply()

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

Definition at line 299 of file ScheduleDeliverTest.php.

299 {
300
301 $oldObject = <<<ICS
302BEGIN:VCALENDAR
303BEGIN:VEVENT
304UID:foo
305DTSTART:20140811T230000Z
306ORGANIZER:mailto:user2.sabredav@sabredav.org
307ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org
308ATTENDEE:mailto:user1.sabredav@sabredav.org
309ATTENDEE:mailto:user3.sabredav@sabredav.org
310END:VEVENT
311END:VCALENDAR
312ICS;
313
314 $newObject = <<<ICS
315BEGIN:VCALENDAR
316BEGIN:VEVENT
317UID:foo
318DTSTART:20140811T230000Z
319ORGANIZER:mailto:user2.sabredav@sabredav.org
320ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org
321ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org
322ATTENDEE:mailto:user3.sabredav@sabredav.org
323END:VEVENT
324END:VCALENDAR
325ICS;
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
334BEGIN:VCALENDAR
335VERSION:2.0
336BEGIN:VEVENT
337UID:foo
338DTSTART:20140811T230000Z
339ORGANIZER;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org
340ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org
341ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org
342ATTENDEE:mailto:user3.sabredav@sabredav.org
343DTSTAMP:**ANY**
344END:VEVENT
345END:VCALENDAR
346ICS;
347
348 $this->assertVObjectEqualsVObject(
349 $expected,
350 $newObject
351 );
352
353 }

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

+ 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.

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

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

+ Here is the call graph for this function:

◆ testUpdatedInvite()

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

Definition at line 109 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testUpdatedInviteSchedulingDisabled()

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

Definition at line 155 of file ScheduleDeliverTest.php.

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

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

+ Here is the call graph for this function:

◆ testUpdatedInviteWrongPath()

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

Definition at line 182 of file ScheduleDeliverTest.php.

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

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

+ 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',
],
[
'principaluri' => 'principals/user2',
'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: