xref: /PHP-7.3/ext/dom/tests/bug41257.phpt (revision d3571ea2)
1--TEST--
2Bug #41257 (lookupNamespaceURI does not work as expected)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$doc = new DOMDocument();
9$doc->load(dirname(__FILE__)."/nsdoc.xml");
10
11$root = $doc->documentElement;
12
13$duri = $doc->lookupNamespaceURI("ns2")."\n";
14$euri = $root->lookupNamespaceURI("ns2")."\n";
15
16var_dump($duri == $euri);
17
18$dpref = $doc->lookupPrefix("http://ns2")."\n";
19$epref = $root->lookupPrefix("http://ns2")."\n";
20
21var_dump($dpref == $epref);
22
23$disdef = $doc->isDefaultNamespace("http://ns")."\n";
24$eisdef = $root->isDefaultNamespace("http://ns")."\n";
25
26var_dump($dpref === $epref);
27?>
28--EXPECT--
29bool(true)
30bool(true)
31bool(true)
32