18 $this->assertEquals(
'foo', $notification->getId());
19 $this->assertEquals(
'"1"', $notification->getETag());
22 $writer->namespaceMap = [
23 'http://calendarserver.org/ns/' =>
'cs',
25 $writer->openMemory();
26 $writer->startDocument(
'1.0',
'UTF-8');
27 $writer->startElement(
'{http://calendarserver.org/ns/}root');
28 $writer->write($notification);
29 $writer->endElement();
30 $this->assertXmlStringEqualsXmlString($expected1, $writer->outputMemory());
33 $writer->namespaceMap = [
34 'http://calendarserver.org/ns/' =>
'cs',
37 $writer->openMemory();
38 $writer->startDocument(
'1.0',
'UTF-8');
39 $writer->startElement(
'{http://calendarserver.org/ns/}root');
40 $notification->xmlSerializeFull($writer);
41 $writer->endElement();
42 $this->assertXmlStringEqualsXmlString($expected2, $writer->outputMemory());
52 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="high"/></cs:root>' .
"\n",
53 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="high"/></cs:root>' .
"\n",
57 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="medium"/></cs:root>' .
"\n",
58 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="medium"><cs:description>bar</cs:description></cs:systemstatus></cs:root>' .
"\n",
62 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="low"/></cs:root>' .
"\n",
63 '<?xml version="1.0" encoding="UTF-8"?>' .
"\n" .
'<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="low"><d:href>http://example.org/</d:href></cs:systemstatus></cs:root>' .
"\n",
iCalendar/vCard/jCal/jCard/xCal/xCard writer object.
testSerializers($notification, $expected1, $expected2)
SystemStatus notification.