--TEST--
Test writing Element::$innerHTML on XML documents - error cases
--EXTENSIONS--
dom
--FILE--
]>
XML);
$child = $dom->documentElement->appendChild($dom->createElementNS('urn:a', 'child'));
$original = $dom->saveXML();
function test($child, $html) {
global $dom, $original;
try {
$child->innerHTML = $html;
} catch (DOMException $e) {
echo $e->getMessage(), "\n";
}
var_dump($dom->saveXML() === $original);
}
test($child, '&foo;');
test($child, '');
test($child, '