php-src/ext/dom/tests/DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

25 lines
489 B
PHP

--TEST--
Testing DOMDocumentFragment::appendXML and DOMDocumentFragment::hasChildNodes
--EXTENSIONS--
dom
--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";
}
?>
--EXPECT--
has no child nodes
has child nodes