php-src/ext/dom/tests/DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt

25 lines
489 B
Plaintext
Raw Normal View History

2008-05-16 17:14:57 +00:00
--TEST--
Testing DOMDocumentFragment::appendXML and DOMDocumentFragment::hasChildNodes
--EXTENSIONS--
dom
2008-05-16 17:14:57 +00:00
--FILE--
<?php
$doc = new DOMDocument();
$fragment = $doc->createDocumentFragment();
if ($fragment->hasChildNodes()) {
echo "has child nodes\n";
} else {
echo "has no child nodes\n";
}
$fragment->appendXML('<foo>bar</foo>');
if ($fragment->hasChildNodes()) {
echo "has child nodes\n";
} else {
echo "has no child nodes\n";
}
?>
2008-05-16 17:14:57 +00:00
--EXPECT--
has no child nodes
has child nodes