Definition at line 7 of file JCalTest.php.
◆ testToJCal()
Sabre\VObject\JCalTest::testToJCal |
( |
| ) |
|
Definition at line 9 of file JCalTest.php.
References Sabre\VObject\Version\VERSION.
11 $cal =
new Component\VCalendar();
13 $event = $cal->add(
'VEVENT', [
15 "DTSTART" =>
new \
DateTime(
"2013-05-26 18:10:00Z"),
17 "CATEGORIES" => [
'home',
'testing'],
18 "CREATED" =>
new \
DateTime(
"2013-05-26 18:10:00Z"),
20 "ATTENDEE" =>
"mailto:armin@example.org",
21 "GEO" => [51.96668, 7.61876],
23 "FREEBUSY" => [
"20130526T210213Z/PT1H",
"20130626T120000Z/20130626T130000Z"],
24 "URL" =>
"http://example.org/",
25 "TZOFFSETFROM" =>
"+0500",
26 "RRULE" => [
'FREQ' =>
'WEEKLY',
'BYDAY' => [
'MO',
'TU']],
30 $event->dtstart[
'VALUE'] =
'DATE';
31 $event->add(
"X-BOOL",
true, [
'VALUE' =>
'BOOLEAN']);
32 $event->add(
"X-TIME",
"08:00:00", [
'VALUE' =>
'TIME']);
33 $event->add(
"ATTACH",
"attachment", [
'VALUE' =>
'BINARY']);
34 $event->add(
"ATTENDEE",
"mailto:dominik@example.org", [
"CN" =>
"Dominik",
"PARTSTAT" =>
"DECLINED"]);
36 $event->add(
'REQUEST-STATUS', [
"2.0",
"Success"]);
37 $event->add(
'REQUEST-STATUS', [
"3.7",
"Invalid Calendar User",
"ATTENDEE:mailto:jsmith@example.org"]);
39 $event->add(
'DTEND',
'20150108T133000');
67 "uid", new \StdClass(),
"text",
"foo",
70 "dtstart", new \StdClass(),
"date",
"2013-05-26",
73 "duration", new \StdClass(),
"duration",
"P1D",
76 "categories", new \StdClass(),
"text",
"home",
"testing",
79 "created", new \StdClass(),
"date-time",
"2013-05-26T18:10:00Z",
82 "attendee", new \StdClass(),
"cal-address",
"mailto:armin@example.org",
88 "partstat" =>
"DECLINED",
91 "mailto:dominik@example.org" 94 "geo",
new \StdClass(),
"float", [51.96668, 7.61876],
97 "sequence", new \StdClass(),
"integer", 5
100 "freebusy", new \StdClass(),
"period", [
"2013-05-26T21:02:13",
"PT1H"], [
"2013-06-26T12:00:00",
"2013-06-26T13:00:00"],
103 "url", new \StdClass(),
"uri",
"http://example.org/",
106 "tzoffsetfrom", new \StdClass(),
"utc-offset",
"+05:00",
109 "rrule", new \StdClass(),
"recur", [
111 'byday' => [
'MO',
'TU'],
115 "x-bool", new \StdClass(),
"boolean", true
118 "x-time", new \StdClass(),
"time",
"08:00:00",
121 "attach", new \StdClass(),
"binary", base64_encode(
'attachment')
133 [
"3.7",
"Invalid Calendar User",
"ATTENDEE:mailto:jsmith@example.org"],
139 "2015-01-08T13:30:00",
147 $this->assertEquals($expected, $cal->jsonSerialize());
const VERSION
Full version number.
The documentation for this class was generated from the following file:
- libs/composer/vendor/sabre/vobject/tests/VObject/JCalTest.php