aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php b/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php
index 5de11a31a..72b5080af 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/TestUtil.php
@@ -99,4 +99,87 @@ END:VCALENDAR';
return $calendarData;
}
+
+ public static function getTestTODO($type = 'due')
+ {
+ switch ($type) {
+ case 'due':
+ $extra = 'DUE:20100104T000000Z';
+ break;
+ case 'due2':
+ $extra = 'DUE:20060104T000000Z';
+ break;
+ case 'due_date':
+ $extra = 'DUE;VALUE=DATE:20060104';
+ break;
+ case 'due_tz':
+ $extra = 'DUE;TZID=Asia/Seoul:20060104T000000Z';
+ break;
+ case 'due_dtstart':
+ $extra = "DTSTART:20050223T060000Z\nDUE:20060104T000000Z";
+ break;
+ case 'due_dtstart2':
+ $extra = "DTSTART:20090223T060000Z\nDUE:20100104T000000Z";
+ break;
+ case 'dtstart':
+ $extra = 'DTSTART:20100223T060000Z';
+ break;
+ case 'dtstart2':
+ $extra = 'DTSTART:20060223T060000Z';
+ break;
+ case 'dtstart_date':
+ $extra = 'DTSTART;VALUE=DATE:20100223';
+ break;
+ case 'dtstart_tz':
+ $extra = 'DTSTART;TZID=Asia/Seoul:20100223T060000Z';
+ break;
+ case 'dtstart_duration':
+ $extra = "DTSTART:20061023T060000Z\nDURATION:PT1H";
+ break;
+ case 'dtstart_duration2':
+ $extra = "DTSTART:20101023T060000Z\nDURATION:PT1H";
+ break;
+ case 'completed':
+ $extra = 'COMPLETED:20060601T000000Z';
+ break;
+ case 'completed2':
+ $extra = 'COMPLETED:20090601T000000Z';
+ break;
+ case 'created':
+ $extra = 'CREATED:20060601T000000Z';
+ break;
+ case 'created2':
+ $extra = 'CREATED:20090601T000000Z';
+ break;
+ case 'completedcreated':
+ $extra = "CREATED:20060601T000000Z\nCOMPLETED:20070101T000000Z";
+ break;
+ case 'completedcreated2':
+ $extra = "CREATED:20090601T000000Z\nCOMPLETED:20100101T000000Z";
+ break;
+ case 'notime':
+ $extra = 'X-FILLER:oh hello';
+ break;
+ default:
+ throw new Exception('Unknown type: '.$type);
+ }
+
+ $todo = 'BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Corp.//CalDAV Client//EN
+BEGIN:VTODO
+DTSTAMP:20060205T235335Z
+'.$extra.'
+STATUS:NEEDS-ACTION
+SUMMARY:Task #1
+UID:DDDEEB7915FA61233B861457@example.com
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VTODO
+END:VCALENDAR';
+
+ return $todo;
+ }
}