From: Arnout Boks Date: Wed, 25 Jan 2017 20:03:50 +0000 (+0100) Subject: Added (failing) testcase for bug #54382 X-Git-Tag: php-7.1.2RC1~23^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=737ee0661c15f5eb812467c3e10ee1f784691be9;p=php Added (failing) testcase for bug #54382 --- diff --git a/ext/dom/tests/bug54382.phpt b/ext/dom/tests/bug54382.phpt new file mode 100644 index 0000000000..fa12b0ef92 --- /dev/null +++ b/ext/dom/tests/bug54382.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #54382 DOMNode::getAttributeNodeNS doesn't get xmlns* attributes +--SKIPIF-- + +--FILE-- + + + +'; + +$xml=new DOMDocument(); +$xml->loadXML($xmlString); +$de = $xml->documentElement; + +$ns2 = $de->getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "ns2"); +if ($ns2 == NULL) { + echo 'namespace node does not exist.' . "\n"; +} else { + echo 'namespace node prefix=' . $ns2->prefix . "\n"; + echo 'namespace node namespaceURI=' . $ns2->namespaceURI . "\n"; +} +--EXPECT-- +namespace node prefix=ns2 +namespace node namespaceURI=http://ns2