mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
7aacc705d0
Closes GH-5958
25 lines
518 B
PHP
25 lines
518 B
PHP
--TEST--
|
|
Testing DOMDocumentFragment::appendXML and DOMDocumentFragment::hasChildNodes
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--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
|