1--TEST-- 2Dom\Node::isEqualNode edge cases 01 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\HTMLDocument::createEmpty(); 9$dom->append($dom->createElement("container")); 10$e1 = $dom->documentElement->appendChild($dom->createElementNS("urn:example1", "example:foo")); 11$e1->after("\n"); 12$e2 = $dom->documentElement->appendChild($dom->createElementNS("urn:example2", "example:foo")); 13 14$e2->setAttributeNS("urn:example2", "example2:bar", "baz1"); 15$e2->setAttributeNS("urn:example1", "example2:bar", "baz2"); 16 17$dom2 = Dom\HTMLDocument::createFromString("<!DOCTYPE HTML>" . $dom->saveHtml()); 18 19// Shouldn't match because the attributes can't roundtrip. 20var_dump($dom->saveHtml($dom->getElementsByTagName("container")[0])); 21var_dump($dom2->saveHtml($dom2->getElementsByTagName("container")[0])); 22var_dump($dom->getElementsByTagName("container")[0]->isEqualNode($dom2->getElementsByTagName("container")[0])); 23 24?> 25--EXPECT-- 26string(118) "<container><example:foo></example:foo> 27<example:foo example2:bar="baz1" example2:bar="baz2"></example:foo></container>" 28string(98) "<container><example:foo></example:foo> 29<example:foo example2:bar="baz1"></example:foo></container>" 30bool(false) 31