We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75acba3 commit af30ba4Copy full SHA for af30ba4
1 file changed
tests/simplexml_dump_Test.php
@@ -57,6 +57,27 @@ public function testDumpWithNS()
57
$return = simplexml_dump($this->simpleXML_NS, true);
58
$this->assertEquals($this->expected_NS, $return);
59
}
60
+
61
+ public function testDumpWithSingleNodeWithAttributesAndNS()
62
+ {
63
+ $xml = '<parent xmlns:ns="ns"><ns:child ns:foo="bar" /></parent>';
64
+ $sxml = simplexml_load_string($xml);
65
66
+ $return = simplexml_dump($sxml->children('ns', true)->child->attributes('ns'), true);
67
68
+ $expected = "SimpleXML object (1 item)
69
+[
70
+ Attribute {
71
+ Namespace: 'ns'
72
+ Namespace Alias: 'ns'
73
+ Name: 'foo'
74
+ Value: 'bar'
75
+ }
76
+]
77
+";
78
79
+ $this->assertEquals($expected, $return);
80
81
82
83
?>
0 commit comments