bug41257.phpt 629 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Bug #41257 (lookupNamespaceURI does not work as expected)
  3. --EXTENSIONS--
  4. dom
  5. --FILE--
  6. <?php
  7. $doc = new DOMDocument();
  8. $doc->load(__DIR__."/nsdoc.xml");
  9. $root = $doc->documentElement;
  10. $duri = $doc->lookupNamespaceURI("ns2")."\n";
  11. $euri = $root->lookupNamespaceURI("ns2")."\n";
  12. var_dump($duri == $euri);
  13. $dpref = $doc->lookupPrefix("http://ns2")."\n";
  14. $epref = $root->lookupPrefix("http://ns2")."\n";
  15. var_dump($dpref == $epref);
  16. $disdef = $doc->isDefaultNamespace("http://ns")."\n";
  17. $eisdef = $root->isDefaultNamespace("http://ns")."\n";
  18. var_dump($dpref === $epref);
  19. ?>
  20. --EXPECT--
  21. bool(true)
  22. bool(true)
  23. bool(true)