ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\Component\VCalendarTest Class Reference
+ Inheritance diagram for Sabre\VObject\Component\VCalendarTest:
+ Collaboration diagram for Sabre\VObject\Component\VCalendarTest:

Public Member Functions

 testExpand ($input, $output, $timeZone='UTC', $start='2011-12-01', $end='2011-12-31')
 @dataProvider expandData More...
 
 expandData ()
 
 testBrokenEventExpand ()
 @expectedException \Sabre\VObject\InvalidDataException More...
 
 testGetDocumentType ()
 
 testValidateCorrect ()
 
 testValidateNoVersion ()
 
 testValidateWrongVersion ()
 
 testValidateNoProdId ()
 
 testValidateDoubleCalScale ()
 
 testValidateDoubleMethod ()
 
 testValidateTwoMasterEvents ()
 
 testValidateOneMasterEvent ()
 
 testGetBaseComponent ()
 
 testGetBaseComponentNoResult ()
 
 testGetBaseComponentWithFilter ()
 
 testGetBaseComponentWithFilterNoResult ()
 
 testNoComponents ()
 
 testCalDAVNoComponents ()
 
 testCalDAVMultiUID ()
 
 testCalDAVMultiComponent ()
 
 testCalDAVMETHOD ()
 
 assertValidate ($ics, $options, $expectedLevel, $expectedMessage=null)
 
 assertValidateResult ($input, $expectedLevel, $expectedMessage=null)
 

Detailed Description

Definition at line 9 of file VCalendarTest.php.

Member Function Documentation

◆ assertValidate()

Sabre\VObject\Component\VCalendarTest::assertValidate (   $ics,
  $options,
  $expectedLevel,
  $expectedMessage = null 
)

Definition at line 755 of file VCalendarTest.php.

755 {
756
758 $result = $vcal->validate($options);
759
760 $this->assertValidateResult($result, $expectedLevel, $expectedMessage);
761
762 }
$result
assertValidateResult($input, $expectedLevel, $expectedMessage=null)
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42

References PHPMailer\PHPMailer\$options, $result, $vcal, Sabre\VObject\Component\VCalendarTest\assertValidateResult(), and Sabre\VObject\Reader\read().

Referenced by Sabre\VObject\Component\VCalendarTest\testCalDAVMETHOD(), Sabre\VObject\Component\VCalendarTest\testCalDAVMultiComponent(), Sabre\VObject\Component\VCalendarTest\testCalDAVMultiUID(), Sabre\VObject\Component\VCalendarTest\testCalDAVNoComponents(), and Sabre\VObject\Component\VCalendarTest\testNoComponents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assertValidateResult()

Sabre\VObject\Component\VCalendarTest::assertValidateResult (   $input,
  $expectedLevel,
  $expectedMessage = null 
)

Definition at line 764 of file VCalendarTest.php.

764 {
765
766 $messages = [];
767 foreach ($input as $warning) {
768 $messages[] = $warning['message'];
769 }
770
771 if ($expectedLevel === 0) {
772 $this->assertEquals(0, count($input), 'No validation messages were expected. We got: ' . implode(', ', $messages));
773 } else {
774 $this->assertEquals(1, count($input), 'We expected exactly 1 validation message, We got: ' . implode(', ', $messages));
775
776 $this->assertEquals($expectedMessage, $input[0]['message']);
777 $this->assertEquals($expectedLevel, $input[0]['level']);
778 }
779
780 }
$warning
Definition: X509warning.php:13
count()
Returns the number of elements.
Definition: Node.php:177
$messages
Definition: en.php:5
foreach($paths as $path) if($argc< 3) $input

References Sabre\VObject\$input, $messages, $warning, and Sabre\VObject\Node\count().

Referenced by Sabre\VObject\Component\VCalendarTest\assertValidate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expandData()

Sabre\VObject\Component\VCalendarTest::expandData ( )

Definition at line 35 of file VCalendarTest.php.

35 {
36
37 $tests = [];
38
39 // No data
40 $input = 'BEGIN:VCALENDAR
41CALSCALE:GREGORIAN
42VERSION:2.0
43END:VCALENDAR
44';
45
47 $tests[] = [$input,$output];
48
49
50 // Simple events
51 $input = 'BEGIN:VCALENDAR
52CALSCALE:GREGORIAN
53VERSION:2.0
54BEGIN:VEVENT
55UID:bla
56SUMMARY:InExpand
57DTSTART;VALUE=DATE:20111202
58END:VEVENT
59BEGIN:VEVENT
60UID:bla2
61SUMMARY:NotInExpand
62DTSTART;VALUE=DATE:20120101
63END:VEVENT
64END:VCALENDAR
65';
66
67 $output = 'BEGIN:VCALENDAR
68CALSCALE:GREGORIAN
69VERSION:2.0
70BEGIN:VEVENT
71UID:bla
72SUMMARY:InExpand
73DTSTART;VALUE=DATE:20111202
74END:VEVENT
75END:VCALENDAR
76';
77
78 $tests[] = [$input, $output];
79
80 // Removing timezone info
81 $input = 'BEGIN:VCALENDAR
82CALSCALE:GREGORIAN
83VERSION:2.0
84BEGIN:VTIMEZONE
85TZID:Europe/Paris
86END:VTIMEZONE
87BEGIN:VEVENT
88UID:bla4
89SUMMARY:RemoveTZ info
90DTSTART;TZID=Europe/Paris:20111203T130102
91END:VEVENT
92END:VCALENDAR
93';
94
95 $output = 'BEGIN:VCALENDAR
96CALSCALE:GREGORIAN
97VERSION:2.0
98BEGIN:VEVENT
99UID:bla4
100SUMMARY:RemoveTZ info
101DTSTART:20111203T120102Z
102END:VEVENT
103END:VCALENDAR
104';
105
106 $tests[] = [$input, $output];
107
108 // Removing timezone info from sub-components. See Issue #278
109 $input = 'BEGIN:VCALENDAR
110CALSCALE:GREGORIAN
111VERSION:2.0
112BEGIN:VTIMEZONE
113TZID:Europe/Paris
114END:VTIMEZONE
115BEGIN:VEVENT
116UID:bla4
117SUMMARY:RemoveTZ info
118DTSTART;TZID=Europe/Paris:20111203T130102
119BEGIN:VALARM
120TRIGGER;VALUE=DATE-TIME;TZID=America/New_York:20151209T133200
121END:VALARM
122END:VEVENT
123END:VCALENDAR
124';
125
126 $output = 'BEGIN:VCALENDAR
127CALSCALE:GREGORIAN
128VERSION:2.0
129BEGIN:VEVENT
130UID:bla4
131SUMMARY:RemoveTZ info
132DTSTART:20111203T120102Z
133BEGIN:VALARM
134TRIGGER;VALUE=DATE-TIME:20151209T183200Z
135END:VALARM
136END:VEVENT
137END:VCALENDAR
138';
139
140 $tests[] = [$input, $output];
141
142 // Recurrence rule
143 $input = 'BEGIN:VCALENDAR
144CALSCALE:GREGORIAN
145VERSION:2.0
146BEGIN:VEVENT
147UID:bla6
148SUMMARY:Testing RRule
149DTSTART:20111125T120000Z
150DTEND:20111125T130000Z
151RRULE:FREQ=WEEKLY
152END:VEVENT
153END:VCALENDAR
154';
155
156 $output = 'BEGIN:VCALENDAR
157CALSCALE:GREGORIAN
158VERSION:2.0
159BEGIN:VEVENT
160UID:bla6
161SUMMARY:Testing RRule
162DTSTART:20111202T120000Z
163DTEND:20111202T130000Z
164RECURRENCE-ID:20111202T120000Z
165END:VEVENT
166BEGIN:VEVENT
167UID:bla6
168SUMMARY:Testing RRule
169DTSTART:20111209T120000Z
170DTEND:20111209T130000Z
171RECURRENCE-ID:20111209T120000Z
172END:VEVENT
173BEGIN:VEVENT
174UID:bla6
175SUMMARY:Testing RRule
176DTSTART:20111216T120000Z
177DTEND:20111216T130000Z
178RECURRENCE-ID:20111216T120000Z
179END:VEVENT
180BEGIN:VEVENT
181UID:bla6
182SUMMARY:Testing RRule
183DTSTART:20111223T120000Z
184DTEND:20111223T130000Z
185RECURRENCE-ID:20111223T120000Z
186END:VEVENT
187BEGIN:VEVENT
188UID:bla6
189SUMMARY:Testing RRule
190DTSTART:20111230T120000Z
191DTEND:20111230T130000Z
192RECURRENCE-ID:20111230T120000Z
193END:VEVENT
194END:VCALENDAR
195';
196
197 $tests[] = [$input, $output];
198
199 // Recurrence rule + override
200 $input = 'BEGIN:VCALENDAR
201CALSCALE:GREGORIAN
202VERSION:2.0
203BEGIN:VEVENT
204UID:bla6
205SUMMARY:Testing RRule2
206DTSTART:20111125T120000Z
207DTEND:20111125T130000Z
208RRULE:FREQ=WEEKLY
209END:VEVENT
210BEGIN:VEVENT
211UID:bla6
212RECURRENCE-ID:20111209T120000Z
213DTSTART:20111209T140000Z
214DTEND:20111209T150000Z
215SUMMARY:Override!
216END:VEVENT
217END:VCALENDAR
218';
219
220 $output = 'BEGIN:VCALENDAR
221CALSCALE:GREGORIAN
222VERSION:2.0
223BEGIN:VEVENT
224UID:bla6
225SUMMARY:Testing RRule2
226DTSTART:20111202T120000Z
227DTEND:20111202T130000Z
228RECURRENCE-ID:20111202T120000Z
229END:VEVENT
230BEGIN:VEVENT
231UID:bla6
232RECURRENCE-ID:20111209T120000Z
233DTSTART:20111209T140000Z
234DTEND:20111209T150000Z
235SUMMARY:Override!
236END:VEVENT
237BEGIN:VEVENT
238UID:bla6
239SUMMARY:Testing RRule2
240DTSTART:20111216T120000Z
241DTEND:20111216T130000Z
242RECURRENCE-ID:20111216T120000Z
243END:VEVENT
244BEGIN:VEVENT
245UID:bla6
246SUMMARY:Testing RRule2
247DTSTART:20111223T120000Z
248DTEND:20111223T130000Z
249RECURRENCE-ID:20111223T120000Z
250END:VEVENT
251BEGIN:VEVENT
252UID:bla6
253SUMMARY:Testing RRule2
254DTSTART:20111230T120000Z
255DTEND:20111230T130000Z
256RECURRENCE-ID:20111230T120000Z
257END:VEVENT
258END:VCALENDAR
259';
260
261 $tests[] = [$input, $output];
262
263 // Floating dates and times.
264 $input = <<<ICS
265BEGIN:VCALENDAR
266VERSION:2.0
267BEGIN:VEVENT
268UID:bla1
269DTSTART:20141112T195000
270END:VEVENT
271BEGIN:VEVENT
272UID:bla2
273DTSTART;VALUE=DATE:20141112
274END:VEVENT
275BEGIN:VEVENT
276UID:bla3
277DTSTART;VALUE=DATE:20141112
278RRULE:FREQ=DAILY;COUNT=2
279END:VEVENT
280END:VCALENDAR
281ICS;
282
283 $output = <<<ICS
284BEGIN:VCALENDAR
285VERSION:2.0
286BEGIN:VEVENT
287UID:bla1
288DTSTART:20141112T225000Z
289END:VEVENT
290BEGIN:VEVENT
291UID:bla2
292DTSTART;VALUE=DATE:20141112
293END:VEVENT
294BEGIN:VEVENT
295UID:bla3
296DTSTART;VALUE=DATE:20141112
297RECURRENCE-ID;VALUE=DATE:20141112
298END:VEVENT
299BEGIN:VEVENT
300UID:bla3
301DTSTART;VALUE=DATE:20141113
302RECURRENCE-ID;VALUE=DATE:20141113
303END:VEVENT
304END:VCALENDAR
305ICS;
306
307 $tests[] = [$input, $output, 'America/Argentina/Buenos_Aires', '2014-01-01', '2015-01-01'];
308
309 // Recurrence rule with no valid instances
310 $input = 'BEGIN:VCALENDAR
311CALSCALE:GREGORIAN
312VERSION:2.0
313BEGIN:VEVENT
314UID:bla6
315SUMMARY:Testing RRule3
316DTSTART:20111125T120000Z
317DTEND:20111125T130000Z
318RRULE:FREQ=WEEKLY;COUNT=1
319EXDATE:20111125T120000Z
320END:VEVENT
321END:VCALENDAR
322';
323
324 $output = 'BEGIN:VCALENDAR
325CALSCALE:GREGORIAN
326VERSION:2.0
327END:VCALENDAR
328';
329
330 $tests[] = [$input, $output];
331 return $tests;
332
333 }
$tests
Definition: bench.php:104

References Sabre\VObject\$input, Sabre\VObject\$output, and $tests.

◆ testBrokenEventExpand()

Sabre\VObject\Component\VCalendarTest::testBrokenEventExpand ( )

@expectedException \Sabre\VObject\InvalidDataException

Definition at line 338 of file VCalendarTest.php.

338 {
339
340 $input = 'BEGIN:VCALENDAR
341CALSCALE:GREGORIAN
342VERSION:2.0
343BEGIN:VEVENT
344RRULE:FREQ=WEEKLY
345DTSTART;VALUE=DATE:20111202
346END:VEVENT
347END:VCALENDAR
348';
350 $vcal->expand(
351 new \DateTime('2011-12-01'),
352 new \DateTime('2011-12-31')
353 );
354
355 }

References Sabre\VObject\$input, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testCalDAVMETHOD()

Sabre\VObject\Component\VCalendarTest::testCalDAVMETHOD ( )

Definition at line 730 of file VCalendarTest.php.

730 {
731
732 $input = <<<ICS
733BEGIN:VCALENDAR
734VERSION:2.0
735METHOD:PUBLISH
736PRODID:vobject
737BEGIN:VEVENT
738UID:foo
739RECURRENCE-ID:20150109T185200Z
740DTSTAMP:20150109T184500Z
741DTSTART:20150109T184500Z
742END:VEVENT
743END:VCALENDAR
744ICS;
745
746 $this->assertValidate(
747 $input,
749 3,
750 "A calendar object on a CalDAV server MUST NOT have a METHOD property."
751 );
752
753 }
assertValidate($ics, $options, $expectedLevel, $expectedMessage=null)
const PROFILE_CALDAV
If this option is set, the validator will operate on iCalendar objects on the assumption that the vca...
Definition: Node.php:45

References Sabre\VObject\$input, Sabre\VObject\Component\VCalendarTest\assertValidate(), and Sabre\VObject\Node\PROFILE_CALDAV.

+ Here is the call graph for this function:

◆ testCalDAVMultiComponent()

Sabre\VObject\Component\VCalendarTest::testCalDAVMultiComponent ( )

Definition at line 701 of file VCalendarTest.php.

701 {
702
703 $input = <<<ICS
704BEGIN:VCALENDAR
705VERSION:2.0
706PRODID:vobject
707BEGIN:VEVENT
708UID:foo
709RECURRENCE-ID:20150109T185200Z
710DTSTAMP:20150109T184500Z
711DTSTART:20150109T184500Z
712END:VEVENT
713BEGIN:VTODO
714UID:foo
715DTSTAMP:20150109T184500Z
716DTSTART:20150109T184500Z
717END:VTODO
718END:VCALENDAR
719ICS;
720
721 $this->assertValidate(
722 $input,
724 3,
725 "A calendar object on a CalDAV server may only have 1 type of component (VEVENT, VTODO or VJOURNAL)."
726 );
727
728 }

References Sabre\VObject\$input, Sabre\VObject\Component\VCalendarTest\assertValidate(), and Sabre\VObject\Node\PROFILE_CALDAV.

+ Here is the call graph for this function:

◆ testCalDAVMultiUID()

Sabre\VObject\Component\VCalendarTest::testCalDAVMultiUID ( )

Definition at line 673 of file VCalendarTest.php.

673 {
674
675 $input = <<<ICS
676BEGIN:VCALENDAR
677VERSION:2.0
678PRODID:vobject
679BEGIN:VEVENT
680UID:foo
681DTSTAMP:20150109T184500Z
682DTSTART:20150109T184500Z
683END:VEVENT
684BEGIN:VEVENT
685UID:bar
686DTSTAMP:20150109T184500Z
687DTSTART:20150109T184500Z
688END:VEVENT
689END:VCALENDAR
690ICS;
691
692 $this->assertValidate(
693 $input,
695 3,
696 "A calendar object on a CalDAV server may only have components with the same UID."
697 );
698
699 }

References Sabre\VObject\$input, Sabre\VObject\Component\VCalendarTest\assertValidate(), and Sabre\VObject\Node\PROFILE_CALDAV.

+ Here is the call graph for this function:

◆ testCalDAVNoComponents()

Sabre\VObject\Component\VCalendarTest::testCalDAVNoComponents ( )

Definition at line 652 of file VCalendarTest.php.

652 {
653
654 $input = <<<ICS
655BEGIN:VCALENDAR
656VERSION:2.0
657PRODID:vobject
658BEGIN:VTIMEZONE
659TZID:America/Toronto
660END:VTIMEZONE
661END:VCALENDAR
662ICS;
663
664 $this->assertValidate(
665 $input,
667 3,
668 "A calendar object on a CalDAV server must have at least 1 component (VTODO, VEVENT, VJOURNAL)."
669 );
670
671 }

References Sabre\VObject\$input, Sabre\VObject\Component\VCalendarTest\assertValidate(), and Sabre\VObject\Node\PROFILE_CALDAV.

+ Here is the call graph for this function:

◆ testExpand()

Sabre\VObject\Component\VCalendarTest::testExpand (   $input,
  $output,
  $timeZone = 'UTC',
  $start = '2011-12-01',
  $end = '2011-12-31' 
)

@dataProvider expandData

Definition at line 16 of file VCalendarTest.php.

16 {
17
19
20 $timeZone = new DateTimeZone($timeZone);
21
22 $vcal = $vcal->expand(
23 new \DateTime($start),
24 new \DateTime($end),
26 );
27
28 // This will normalize the output
29 $output = VObject\Reader::read($output)->serialize();
30
31 $this->assertVObjectEqualsVObject($output, $vcal->serialize());
32
33 }
$start
Definition: bench.php:8

References $end, Sabre\VObject\$input, Sabre\VObject\$output, $start, $timeZone, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetBaseComponent()

Sabre\VObject\Component\VCalendarTest::testGetBaseComponent ( )

Definition at line 528 of file VCalendarTest.php.

528 {
529
530 $input = 'BEGIN:VCALENDAR
531VERSION:2.0
532PRODID:foo
533METHOD:REQUEST
534BEGIN:VEVENT
535SUMMARY:test
536DTSTART;VALUE=DATE:20111202
537UID:foo
538DTSTAMP:20140122T234434Z
539END:VEVENT
540BEGIN:VEVENT
541DTSTART;VALUE=DATE:20111202
542UID:foo
543DTSTAMP:20140122T234434Z
544RECURRENCE-ID;VALUE=DATE:20111202
545END:VEVENT
546END:VCALENDAR
547';
548
550
551 $result = $vcal->getBaseComponent();
552 $this->assertEquals('test', $result->SUMMARY->getValue());
553
554 }

References Sabre\VObject\$input, $result, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetBaseComponentNoResult()

Sabre\VObject\Component\VCalendarTest::testGetBaseComponentNoResult ( )

Definition at line 556 of file VCalendarTest.php.

556 {
557
558 $input = 'BEGIN:VCALENDAR
559VERSION:2.0
560PRODID:foo
561METHOD:REQUEST
562BEGIN:VEVENT
563SUMMARY:test
564RECURRENCE-ID;VALUE=DATE:20111202
565DTSTART;VALUE=DATE:20111202
566UID:foo
567DTSTAMP:20140122T234434Z
568END:VEVENT
569BEGIN:VEVENT
570DTSTART;VALUE=DATE:20111202
571UID:foo
572DTSTAMP:20140122T234434Z
573RECURRENCE-ID;VALUE=DATE:20111202
574END:VEVENT
575END:VCALENDAR
576';
577
579
580 $result = $vcal->getBaseComponent();
581 $this->assertNull($result);
582
583 }

References Sabre\VObject\$input, $result, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetBaseComponentWithFilter()

Sabre\VObject\Component\VCalendarTest::testGetBaseComponentWithFilter ( )

Definition at line 585 of file VCalendarTest.php.

585 {
586
587 $input = 'BEGIN:VCALENDAR
588VERSION:2.0
589PRODID:foo
590METHOD:REQUEST
591BEGIN:VEVENT
592SUMMARY:test
593DTSTART;VALUE=DATE:20111202
594UID:foo
595DTSTAMP:20140122T234434Z
596END:VEVENT
597BEGIN:VEVENT
598DTSTART;VALUE=DATE:20111202
599UID:foo
600DTSTAMP:20140122T234434Z
601RECURRENCE-ID;VALUE=DATE:20111202
602END:VEVENT
603END:VCALENDAR
604';
605
607
608 $result = $vcal->getBaseComponent('VEVENT');
609 $this->assertEquals('test', $result->SUMMARY->getValue());
610
611 }

References Sabre\VObject\$input, $result, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetBaseComponentWithFilterNoResult()

Sabre\VObject\Component\VCalendarTest::testGetBaseComponentWithFilterNoResult ( )

Definition at line 613 of file VCalendarTest.php.

613 {
614
615 $input = 'BEGIN:VCALENDAR
616VERSION:2.0
617PRODID:foo
618METHOD:REQUEST
619BEGIN:VTODO
620SUMMARY:test
621UID:foo
622DTSTAMP:20140122T234434Z
623END:VTODO
624END:VCALENDAR
625';
626
628
629 $result = $vcal->getBaseComponent('VEVENT');
630 $this->assertNull($result);
631
632 }

References Sabre\VObject\$input, $result, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testGetDocumentType()

Sabre\VObject\Component\VCalendarTest::testGetDocumentType ( )

Definition at line 357 of file VCalendarTest.php.

357 {
358
359 $vcard = new VCalendar();
360 $vcard->VERSION = '2.0';
361 $this->assertEquals(VCalendar::ICALENDAR20, $vcard->getDocumentType());
362
363 }
const ICALENDAR20
iCalendar 2.0.
Definition: Document.php:34

References Sabre\VObject\Document\ICALENDAR20.

◆ testNoComponents()

Sabre\VObject\Component\VCalendarTest::testNoComponents ( )

Definition at line 634 of file VCalendarTest.php.

634 {
635
636 $input = <<<ICS
637BEGIN:VCALENDAR
638VERSION:2.0
639PRODID:vobject
640END:VCALENDAR
641ICS;
642
643 $this->assertValidate(
644 $input,
645 0,
646 3,
647 "An iCalendar object must have at least 1 component."
648 );
649
650 }

References Sabre\VObject\$input, and Sabre\VObject\Component\VCalendarTest\assertValidate().

+ Here is the call graph for this function:

◆ testValidateCorrect()

Sabre\VObject\Component\VCalendarTest::testValidateCorrect ( )

Definition at line 365 of file VCalendarTest.php.

365 {
366
367 $input = 'BEGIN:VCALENDAR
368CALSCALE:GREGORIAN
369VERSION:2.0
370PRODID:foo
371BEGIN:VEVENT
372DTSTART;VALUE=DATE:20111202
373DTSTAMP:20140122T233226Z
374UID:foo
375END:VEVENT
376END:VCALENDAR
377';
378
380 $this->assertEquals([], $vcal->validate(), 'Got an error');
381
382 }

References Sabre\VObject\$input, $vcal, and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateDoubleCalScale()

Sabre\VObject\Component\VCalendarTest::testValidateDoubleCalScale ( )

Definition at line 439 of file VCalendarTest.php.

439 {
440
441 $input = 'BEGIN:VCALENDAR
442VERSION:2.0
443PRODID:foo
444CALSCALE:GREGORIAN
445CALSCALE:GREGORIAN
446BEGIN:VEVENT
447DTSTART;VALUE=DATE:20111202
448UID:foo
449DTSTAMP:20140122T234434Z
450END:VEVENT
451END:VCALENDAR
452';
453
455 $this->assertEquals(1, count($vcal->validate()));
456
457 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateDoubleMethod()

Sabre\VObject\Component\VCalendarTest::testValidateDoubleMethod ( )

Definition at line 459 of file VCalendarTest.php.

459 {
460
461 $input = 'BEGIN:VCALENDAR
462VERSION:2.0
463PRODID:foo
464METHOD:REQUEST
465METHOD:REQUEST
466BEGIN:VEVENT
467DTSTART;VALUE=DATE:20111202
468UID:foo
469DTSTAMP:20140122T234434Z
470END:VEVENT
471END:VCALENDAR
472';
473
475 $this->assertEquals(1, count($vcal->validate()));
476
477 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateNoProdId()

Sabre\VObject\Component\VCalendarTest::testValidateNoProdId ( )

Definition at line 421 of file VCalendarTest.php.

421 {
422
423 $input = 'BEGIN:VCALENDAR
424CALSCALE:GREGORIAN
425VERSION:2.0
426BEGIN:VEVENT
427DTSTART;VALUE=DATE:20111202
428UID:foo
429DTSTAMP:20140122T234434Z
430END:VEVENT
431END:VCALENDAR
432';
433
435 $this->assertEquals(1, count($vcal->validate()));
436
437 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateNoVersion()

Sabre\VObject\Component\VCalendarTest::testValidateNoVersion ( )

Definition at line 384 of file VCalendarTest.php.

384 {
385
386 $input = 'BEGIN:VCALENDAR
387CALSCALE:GREGORIAN
388PRODID:foo
389BEGIN:VEVENT
390DTSTART;VALUE=DATE:20111202
391UID:foo
392DTSTAMP:20140122T234434Z
393END:VEVENT
394END:VCALENDAR
395';
396
398 $this->assertEquals(1, count($vcal->validate()));
399
400 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateOneMasterEvent()

Sabre\VObject\Component\VCalendarTest::testValidateOneMasterEvent ( )

Definition at line 503 of file VCalendarTest.php.

503 {
504
505 $input = 'BEGIN:VCALENDAR
506VERSION:2.0
507PRODID:foo
508METHOD:REQUEST
509BEGIN:VEVENT
510DTSTART;VALUE=DATE:20111202
511UID:foo
512DTSTAMP:20140122T234434Z
513END:VEVENT
514BEGIN:VEVENT
515DTSTART;VALUE=DATE:20111202
516UID:foo
517DTSTAMP:20140122T234434Z
518RECURRENCE-ID;VALUE=DATE:20111202
519END:VEVENT
520END:VCALENDAR
521';
522
524 $this->assertEquals(0, count($vcal->validate()));
525
526 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateTwoMasterEvents()

Sabre\VObject\Component\VCalendarTest::testValidateTwoMasterEvents ( )

Definition at line 479 of file VCalendarTest.php.

479 {
480
481 $input = 'BEGIN:VCALENDAR
482VERSION:2.0
483PRODID:foo
484METHOD:REQUEST
485BEGIN:VEVENT
486DTSTART;VALUE=DATE:20111202
487UID:foo
488DTSTAMP:20140122T234434Z
489END:VEVENT
490BEGIN:VEVENT
491DTSTART;VALUE=DATE:20111202
492UID:foo
493DTSTAMP:20140122T234434Z
494END:VEVENT
495END:VCALENDAR
496';
497
499 $this->assertEquals(1, count($vcal->validate()));
500
501 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

◆ testValidateWrongVersion()

Sabre\VObject\Component\VCalendarTest::testValidateWrongVersion ( )

Definition at line 402 of file VCalendarTest.php.

402 {
403
404 $input = 'BEGIN:VCALENDAR
405CALSCALE:GREGORIAN
406VERSION:3.0
407PRODID:foo
408BEGIN:VEVENT
409DTSTART;VALUE=DATE:20111202
410UID:foo
411DTSTAMP:20140122T234434Z
412END:VEVENT
413END:VCALENDAR
414';
415
417 $this->assertEquals(1, count($vcal->validate()));
418
419 }

References Sabre\VObject\$input, $vcal, Sabre\VObject\Node\count(), and Sabre\VObject\Reader\read().

+ Here is the call graph for this function:

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