--TEST-- Dom\Document::$title setter --EXTENSIONS-- dom --FILE-- '); $dom->title = "hello & world"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "hello & world"; echo $dom->saveXML(), "\n"; $dom->title = ""; echo $dom->saveXML(), "\n"; $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; var_dump($dom->documentElement->firstElementChild->prefix, $dom->documentElement->firstElementChild->namespaceURI); $dom = Dom\XMLDocument::createFromString('first node
'); $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom->documentElement->firstElementChild->remove(); $dom->title = "test2"; echo $dom->saveXML(), "\n"; echo "\n=== HTML namespaced test ===\n\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString('foo<div/>'); $dom->title = "test"; echo $dom->saveXML(), "\n"; echo "\n=== neither namespaced test ===\n\n"; $dom = Dom\XMLDocument::createEmpty(); $dom->title = ""; echo $dom->saveXML(), "\n"; $dom = Dom\XMLDocument::createFromString(''); $dom->title = "test"; echo $dom->saveXML(), "\n"; ?> --EXPECT-- === SVG namespaced test === hello &amp; world test test NULL string(26) "http://www.w3.org/2000/svg" testfirst node
test2first node
=== HTML namespaced test === test test test === neither namespaced test ===