31 $this->assertVObjectEqualsVObject(
$output,
$vcal->serialize());
57 DTSTART;VALUE=DATE:20111202 62 DTSTART;VALUE=DATE:20120101 73 DTSTART;VALUE=DATE:20111202 90 DTSTART;TZID=Europe/Paris:20111203T130102 100 SUMMARY:RemoveTZ info 101 DTSTART:20111203T120102Z 117 SUMMARY:RemoveTZ info 118 DTSTART;TZID=Europe/Paris:20111203T130102 120 TRIGGER;VALUE=DATE-TIME;TZID=America/New_York:20151209T133200 131 SUMMARY:RemoveTZ info 132 DTSTART:20111203T120102Z 134 TRIGGER;VALUE=DATE-TIME:20151209T183200Z 148 SUMMARY:Testing RRule 149 DTSTART:20111125T120000Z 150 DTEND:20111125T130000Z 161 SUMMARY:Testing RRule 162 DTSTART:20111202T120000Z 163 DTEND:20111202T130000Z 164 RECURRENCE-ID:20111202T120000Z 168 SUMMARY:Testing RRule 169 DTSTART:20111209T120000Z 170 DTEND:20111209T130000Z 171 RECURRENCE-ID:20111209T120000Z 175 SUMMARY:Testing RRule 176 DTSTART:20111216T120000Z 177 DTEND:20111216T130000Z 178 RECURRENCE-ID:20111216T120000Z 182 SUMMARY:Testing RRule 183 DTSTART:20111223T120000Z 184 DTEND:20111223T130000Z 185 RECURRENCE-ID:20111223T120000Z 189 SUMMARY:Testing RRule 190 DTSTART:20111230T120000Z 191 DTEND:20111230T130000Z 192 RECURRENCE-ID:20111230T120000Z 205 SUMMARY:Testing RRule2 206 DTSTART:20111125T120000Z 207 DTEND:20111125T130000Z 212 RECURRENCE-ID:20111209T120000Z 213 DTSTART:20111209T140000Z 214 DTEND:20111209T150000Z 225 SUMMARY:Testing RRule2 226 DTSTART:20111202T120000Z 227 DTEND:20111202T130000Z 228 RECURRENCE-ID:20111202T120000Z 232 RECURRENCE-ID:20111209T120000Z 233 DTSTART:20111209T140000Z 234 DTEND:20111209T150000Z 239 SUMMARY:Testing RRule2 240 DTSTART:20111216T120000Z 241 DTEND:20111216T130000Z 242 RECURRENCE-ID:20111216T120000Z 246 SUMMARY:Testing RRule2 247 DTSTART:20111223T120000Z 248 DTEND:20111223T130000Z 249 RECURRENCE-ID:20111223T120000Z 253 SUMMARY:Testing RRule2 254 DTSTART:20111230T120000Z 255 DTEND:20111230T130000Z 256 RECURRENCE-ID:20111230T120000Z 269 DTSTART:20141112T195000
273 DTSTART;VALUE=DATE:20141112
277 DTSTART;VALUE=DATE:20141112
278 RRULE:FREQ=DAILY;COUNT=2
288 DTSTART:20141112T225000Z
292 DTSTART;VALUE=DATE:20141112
296 DTSTART;VALUE=DATE:20141112
297 RECURRENCE-ID;VALUE=DATE:20141112
301 DTSTART;VALUE=DATE:20141113
302 RECURRENCE-ID;VALUE=DATE:20141113
307 $tests[] = [
$input,
$output,
'America/Argentina/Buenos_Aires',
'2014-01-01',
'2015-01-01'];
315 SUMMARY:Testing RRule3 316 DTSTART:20111125T120000Z 317 DTEND:20111125T130000Z 318 RRULE:FREQ=WEEKLY;COUNT=1 319 EXDATE:20111125T120000Z 324 $output =
'BEGIN:VCALENDAR 345 DTSTART;VALUE=DATE:20111202 360 $vcard->VERSION =
'2.0';
372 DTSTART;VALUE=DATE:20111202 373 DTSTAMP:20140122T233226Z 380 $this->assertEquals([],
$vcal->validate(),
'Got an error');
390 DTSTART;VALUE=DATE:20111202 392 DTSTAMP:20140122T234434Z 398 $this->assertEquals(1,
count(
$vcal->validate()));
409 DTSTART;VALUE=DATE:20111202 411 DTSTAMP:20140122T234434Z 417 $this->assertEquals(1,
count(
$vcal->validate()));
427 DTSTART;VALUE=DATE:20111202 429 DTSTAMP:20140122T234434Z 435 $this->assertEquals(1,
count(
$vcal->validate()));
447 DTSTART;VALUE=DATE:20111202 449 DTSTAMP:20140122T234434Z 455 $this->assertEquals(1,
count(
$vcal->validate()));
467 DTSTART;VALUE=DATE:20111202 469 DTSTAMP:20140122T234434Z 475 $this->assertEquals(1,
count(
$vcal->validate()));
486 DTSTART;VALUE=DATE:20111202 488 DTSTAMP:20140122T234434Z 491 DTSTART;VALUE=DATE:20111202 493 DTSTAMP:20140122T234434Z 499 $this->assertEquals(1,
count(
$vcal->validate()));
510 DTSTART;VALUE=DATE:20111202 512 DTSTAMP:20140122T234434Z 515 DTSTART;VALUE=DATE:20111202 517 DTSTAMP:20140122T234434Z 518 RECURRENCE-ID;VALUE=DATE:20111202 524 $this->assertEquals(0,
count(
$vcal->validate()));
536 DTSTART;VALUE=DATE:20111202 538 DTSTAMP:20140122T234434Z 541 DTSTART;VALUE=DATE:20111202 543 DTSTAMP:20140122T234434Z 544 RECURRENCE-ID;VALUE=DATE:20111202 552 $this->assertEquals(
'test',
$result->SUMMARY->getValue());
564 RECURRENCE-ID;VALUE=DATE:20111202 565 DTSTART;VALUE=DATE:20111202 567 DTSTAMP:20140122T234434Z 570 DTSTART;VALUE=DATE:20111202 572 DTSTAMP:20140122T234434Z 573 RECURRENCE-ID;VALUE=DATE:20111202 593 DTSTART;VALUE=DATE:20111202 595 DTSTAMP:20140122T234434Z 598 DTSTART;VALUE=DATE:20111202 600 DTSTAMP:20140122T234434Z 601 RECURRENCE-ID;VALUE=DATE:20111202 609 $this->assertEquals(
'test',
$result->SUMMARY->getValue());
622 DTSTAMP:20140122T234434Z 647 "An iCalendar object must have at least 1 component." 668 "A calendar object on a CalDAV server must have at least 1 component (VTODO, VEVENT, VJOURNAL)." 681 DTSTAMP:20150109T184500Z
682 DTSTART:20150109T184500Z
686 DTSTAMP:20150109T184500Z
687 DTSTART:20150109T184500Z
696 "A calendar object on a CalDAV server may only have components with the same UID." 709 RECURRENCE-ID:20150109T185200Z
710 DTSTAMP:20150109T184500Z
711 DTSTART:20150109T184500Z
715 DTSTAMP:20150109T184500Z
716 DTSTART:20150109T184500Z
725 "A calendar object on a CalDAV server may only have 1 type of component (VEVENT, VTODO or VJOURNAL)." 739 RECURRENCE-ID:20150109T185200Z
740 DTSTAMP:20150109T184500Z
741 DTSTART:20150109T184500Z
750 "A calendar object on a CalDAV server MUST NOT have a METHOD property." 771 if ($expectedLevel === 0) {
772 $this->assertEquals(0,
count(
$input),
'No validation messages were expected. We got: ' . implode(
', ',
$messages));
774 $this->assertEquals(1,
count(
$input),
'We expected exactly 1 validation message, We got: ' . implode(
', ',
$messages));
776 $this->assertEquals($expectedMessage,
$input[0][
'message']);
777 $this->assertEquals($expectedLevel,
$input[0][
'level']);
testGetBaseComponentWithFilterNoResult()
testValidateWrongVersion()
testValidateDoubleMethod()
testGetBaseComponentWithFilter()
testValidateTwoMasterEvents()
testValidateDoubleCalScale()
testGetBaseComponentNoResult()
const ICALENDAR20
iCalendar 2.0.
assertValidate($ics, $options, $expectedLevel, $expectedMessage=null)
count()
Returns the number of elements.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
testCalDAVMultiComponent()
const PROFILE_CALDAV
If this option is set, the validator will operate on iCalendar objects on the assumption that the vca...
assertValidateResult($input, $expectedLevel, $expectedMessage=null)
testExpand($input, $output, $timeZone='UTC', $start='2011-12-01', $end='2011-12-31')
expandData
testValidateOneMasterEvent()