com php-src: Added (failing) testcase for bug #54382: ext/dom/tests/bug54382.phpt

From: Date: Wed, 25 Jan 2017 20:59:23 +0000
Subject: com php-src: Added (failing) testcase for bug #54382: ext/dom/tests/bug54382.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96872@lists.php.net to get a copy of this message
Commit: 737ee0661c15f5eb812467c3e10ee1f784691be9 Author: Arnout Boks <arnoutboks@gmail.com> Wed, 25 Jan 2017 21:03:50 +0100 Committer: Joe Watkins <krakjoe@php.net> Wed, 25 Jan 2017 20:59:23 +0000 Parents: c44efbbbb1a1b32ee3756b270f41c7507ee22e3b Branches: PHP-7.0 PHP-7..1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=737ee0661c15f5eb812467c3e10ee1f784691be9 Log: Added (failing) testcase for bug #54382 Bugs: https://bugs.php.net/54382 Changed paths: A ext/dom/tests/bug54382.phpt Diff: diff --git a/ext/dom/tests/bug54382.phpt b/ext/dom/tests/bug54382.phpt new file mode 100644 index 0000000..fa12b0e --- /dev/null +++ b/ext/dom/tests/bug54382.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #54382 DOMNode::getAttributeNodeNS doesn't get xmlns* attributes +--SKIPIF-- +<?php +require_once('skipif.inc'); +?> +--FILE-- +<?php +$xmlString = '<?xml version="1.0" encoding="utf-8" ?> +<root xmlns="http://ns" xmlns:ns2="http://ns2"> + <ns2:child /> +</root>'; + +$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

« previous php.cvs (#96872) next »