From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php | 106 +++++++++++------------ 1 file changed, 51 insertions(+), 55 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php') diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php b/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php index 673d39c0a..72b5080af 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php @@ -1,39 +1,41 @@ createCalendar( 'principals/user1', 'UUID-123467', [ - '{DAV:}displayname' => 'user1 calendar', + '{DAV:}displayname' => 'user1 calendar', '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', + '{http://apple.com/ns/ical/}calendar-order' => '1', + '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', ] ); $backend->createCalendar( 'principals/user1', 'UUID-123468', [ - '{DAV:}displayname' => 'user1 calendar2', + '{DAV:}displayname' => 'user1 calendar2', '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', + '{http://apple.com/ns/ical/}calendar-order' => '1', + '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', ] ); $backend->createCalendarObject($calendarId, 'UUID-2345', self::getTestCalendarData()); - return $backend; + return $backend; } - static function getTestCalendarData($type = 1) { - + public static function getTestCalendarData($type = 1) + { $calendarData = 'BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Apple Inc.//iCal 4.0.1//EN @@ -62,108 +64,104 @@ SUMMARY:Something here DTSTAMP:20100228T130202Z'; switch ($type) { - case 1 : + case 1: $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDTEND;TZID=Asia/Seoul:20100223T070000\n"; break; - case 2 : + case 2: $calendarData .= "\nDTSTART:20100223T060000\nDTEND:20100223T070000\n"; break; - case 3 : + case 3: $calendarData .= "\nDTSTART;VALUE=DATE:20100223\nDTEND;VALUE=DATE:20100223\n"; break; - case 4 : + case 4: $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDURATION:PT1H\n"; break; - case 5 : + case 5: $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDURATION:-P5D\n"; break; - case 6 : + case 6: $calendarData .= "\nDTSTART;VALUE=DATE:20100223\n"; break; - case 7 : + case 7: $calendarData .= "\nDTSTART;VALUE=DATETIME:20100223T060000\n"; break; // No DTSTART, so intentionally broken - case 'X' : + case 'X': $calendarData .= "\n"; break; } - $calendarData .= 'ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:lisa@example.com SEQUENCE:2 END:VEVENT END:VCALENDAR'; return $calendarData; - } - static function getTestTODO($type = 'due') { - + public static function getTestTODO($type = 'due') + { switch ($type) { - - case 'due' : - $extra = "DUE:20100104T000000Z"; + case 'due': + $extra = 'DUE:20100104T000000Z'; break; - case 'due2' : - $extra = "DUE:20060104T000000Z"; + case 'due2': + $extra = 'DUE:20060104T000000Z'; break; - case 'due_date' : - $extra = "DUE;VALUE=DATE:20060104"; + case 'due_date': + $extra = 'DUE;VALUE=DATE:20060104'; break; - case 'due_tz' : - $extra = "DUE;TZID=Asia/Seoul:20060104T000000Z"; + case 'due_tz': + $extra = 'DUE;TZID=Asia/Seoul:20060104T000000Z'; break; - case 'due_dtstart' : + case 'due_dtstart': $extra = "DTSTART:20050223T060000Z\nDUE:20060104T000000Z"; break; - case 'due_dtstart2' : + case 'due_dtstart2': $extra = "DTSTART:20090223T060000Z\nDUE:20100104T000000Z"; break; - case 'dtstart' : + case 'dtstart': $extra = 'DTSTART:20100223T060000Z'; break; - case 'dtstart2' : + case 'dtstart2': $extra = 'DTSTART:20060223T060000Z'; break; - case 'dtstart_date' : + case 'dtstart_date': $extra = 'DTSTART;VALUE=DATE:20100223'; break; - case 'dtstart_tz' : + case 'dtstart_tz': $extra = 'DTSTART;TZID=Asia/Seoul:20100223T060000Z'; break; - case 'dtstart_duration' : + case 'dtstart_duration': $extra = "DTSTART:20061023T060000Z\nDURATION:PT1H"; break; - case 'dtstart_duration2' : + case 'dtstart_duration2': $extra = "DTSTART:20101023T060000Z\nDURATION:PT1H"; break; - case 'completed' : + case 'completed': $extra = 'COMPLETED:20060601T000000Z'; break; - case 'completed2' : + case 'completed2': $extra = 'COMPLETED:20090601T000000Z'; break; - case 'created' : + case 'created': $extra = 'CREATED:20060601T000000Z'; break; - case 'created2' : + case 'created2': $extra = 'CREATED:20090601T000000Z'; break; - case 'completedcreated' : + case 'completedcreated': $extra = "CREATED:20060601T000000Z\nCOMPLETED:20070101T000000Z"; break; - case 'completedcreated2' : + case 'completedcreated2': $extra = "CREATED:20090601T000000Z\nCOMPLETED:20100101T000000Z"; break; - case 'notime' : + case 'notime': $extra = 'X-FILLER:oh hello'; break; - default : - throw new Exception('Unknown type: ' . $type); - + default: + throw new Exception('Unknown type: '.$type); } $todo = 'BEGIN:VCALENDAR @@ -171,7 +169,7 @@ VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VTODO DTSTAMP:20060205T235335Z -' . $extra . ' +'.$extra.' STATUS:NEEDS-ACTION SUMMARY:Task #1 UID:DDDEEB7915FA61233B861457@example.com @@ -183,7 +181,5 @@ END:VTODO END:VCALENDAR'; return $todo; - } - } -- cgit v1.2.3