File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ SimpleXMLElement::asXML() with a fragment and a filename
3
+ --EXTENSIONS--
4
+ simplexml
5
+ --FILE--
6
+ <?php
7
+
8
+ $ sxe = simplexml_load_string (<<<XML
9
+ <?xml version="1.0"?>
10
+ <container>
11
+ <container2>
12
+ <child id="foo">bar</child>
13
+ </container2>
14
+ </container>
15
+ XML );
16
+ $ sxe ->container2 ->asXML (__DIR__ ."/SimpleXMLElement_asXML_fragment_filename_output.tmp " );
17
+
18
+ // Note: the strange indent is correct: the indent text node preceding container2 is not emitted.
19
+ echo file_get_contents (__DIR__ ."/SimpleXMLElement_asXML_fragment_filename_output.tmp " );
20
+
21
+ ?>
22
+ --CLEAN--
23
+ <?php
24
+ @unlink (__DIR__ ."/SimpleXMLElement_asXML_fragment_filename_output.tmp " );
25
+ ?>
26
+ --EXPECT--
27
+ <container2>
28
+ <child id="foo">bar</child>
29
+ </container2>
You can’t perform that action at this time.
0 commit comments