19 $this->assertEquals(
'foo', $notification->getId());
20 $this->assertEquals(
'"1"', $notification->getETag());
22 $simpleExpected =
'<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:invite-reply/></cs:root>';
25 $writer->namespaceMap = [
26 'http://calendarserver.org/ns/' =>
'cs',
28 $writer->openMemory();
29 $writer->startDocument(
'1.0',
'UTF-8');
30 $writer->startElement(
'{http://calendarserver.org/ns/}root');
31 $writer->write($notification);
32 $writer->endElement();
34 $this->assertEquals($simpleExpected, $writer->outputMemory());
37 $writer->contextUri =
'/';
38 $writer->namespaceMap = [
39 'http://calendarserver.org/ns/' =>
'cs',
42 $writer->openMemory();
43 $writer->startDocument(
'1.0',
'UTF-8');
44 $writer->startElement(
'{http://calendarserver.org/ns/}root');
45 $notification->xmlSerializeFull($writer);
46 $writer->endElement();
48 $this->assertXmlStringEqualsXmlString($expected, $writer->outputMemory());
55 $dtStamp = new \DateTime(
'2012-01-01 00:00:00 GMT');
60 'dtStamp' => $dtStamp,
63 'href' =>
'mailto:foo@example.org',
65 'hostUrl' =>
'calendar' 68 <?xml version=
"1.0" encoding=
"UTF-8"?>
69 <cs:root xmlns:cs=
"http://calendarserver.org/ns/" xmlns:d=
"DAV:">
70 <cs:dtstamp>20120101T000000Z</cs:dtstamp>
73 <cs:
in-reply-to>bar</cs:
in-reply-to>
74 <d:href>mailto:foo@example.org</d:href>
77 <d:href>/calendar</d:href>
87 'dtStamp' => $dtStamp,
90 'href' =>
'mailto:foo@example.org',
92 'hostUrl' =>
'calendar',
93 'summary' =>
'Summary!' 96 <?xml version=
"1.0" encoding=
"UTF-8"?>
97 <cs:root xmlns:cs=
"http://calendarserver.org/ns/" xmlns:d=
"DAV:">
98 <cs:dtstamp>20120101T000000Z</cs:dtstamp>
101 <cs:
in-reply-to>bar</cs:
in-reply-to>
102 <d:href>mailto:foo@example.org</d:href>
103 <cs:invite-declined/>
105 <d:href>/calendar</d:href>
107 <cs:summary>Summary!</cs:summary>
133 'foo-i-will-break' =>
true,
139 'inReplyTo' =>
'qrs',
iCalendar/vCard/jCal/jCard/xCal/xCard writer object.
testMissingArg()
InvalidArgumentException
testSerializers($notification, $expected)
This class represents the cs:invite-reply notification element.
testUnknownArg()
InvalidArgumentException