Definition at line 8 of file ElementsTest.php.
◆ testDeserialize()
Sabre\Xml\Element\ElementsTest::testDeserialize |
( |
| ) |
|
Definition at line 10 of file ElementsTest.php.
References $input, Sabre\VObject\$output, and $reader.
14 <root xmlns=
"http://sabredav.org/ns">
20 <elem5>content</elem5>
21 <elem6><subnode /></elem6>
34 '{http://sabredav.org/ns}listThingy' =>
'Sabre\\Xml\\Element\\Elements',
41 'name' =>
'{http://sabredav.org/ns}root',
44 'name' =>
'{http://sabredav.org/ns}listThingy',
46 '{http://sabredav.org/ns}elem1',
47 '{http://sabredav.org/ns}elem2',
48 '{http://sabredav.org/ns}elem3',
49 '{http://sabredav.org/ns}elem4',
50 '{http://sabredav.org/ns}elem5',
51 '{http://sabredav.org/ns}elem6',
56 'name' =>
'{http://sabredav.org/ns}listThingy',
61 'name' =>
'{http://sabredav.org/ns}otherThing',
64 'name' =>
'{http://sabredav.org/ns}elem1',
69 'name' =>
'{http://sabredav.org/ns}elem2',
74 'name' =>
'{http://sabredav.org/ns}elem3',
◆ testSerialize()
Sabre\Xml\Element\ElementsTest::testSerialize |
( |
| ) |
|
Definition at line 87 of file ElementsTest.php.
References Sabre\VObject\$output.
90 '{http://sabredav.org/ns}elem1',
91 '{http://sabredav.org/ns}elem2',
92 '{http://sabredav.org/ns}elem3',
93 '{http://sabredav.org/ns}elem4',
94 '{http://sabredav.org/ns}elem5',
95 '{http://sabredav.org/ns}elem6',
98 $writer =
new Writer();
99 $writer->namespaceMap = [
100 'http://sabredav.org/ns' => null
102 $writer->openMemory();
103 $writer->startDocument(
'1.0');
104 $writer->setIndent(
true);
106 '{http://sabredav.org/ns}root' =>
new Elements($value),
109 $output = $writer->outputMemory();
112 <?xml version=
"1.0"?>
113 <root xmlns=
"http://sabredav.org/ns">
124 $this->assertEquals($expected,
$output);
The documentation for this class was generated from the following file: