summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMDocumentFragment_appendXML_error_003.phpt
blob: 8735ae6ecf1a137d1c9b6becb0c2c7e5b4c17ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
DOMDocumentFragment::appendXML() with unbalanced chunks.
--CREDITS--
Eric Lee Stewart <ericleestewart@gmail.com>
# TestFest Atlanta 2009-05-24
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$document = new DOMDocument;
$root = $document->createElement('root');
$document->appendChild($root);

$fragment = $document->createDocumentFragment();
@$fragment->appendXML('<foo>is<bar>great</foo>');
$root->appendChild($fragment);
?>
--EXPECTF--
Warning: DOMNode::appendChild(): Document Fragment is empty in %s on line %d