summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMDocumentFragment_appendXML_error_002.phpt
blob: c02c920849d148dbfc4ef51d426669ce9db764a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
DOMDocumentFragment::appendXML() with unbound fragment.
--CREDITS--
Eric Lee Stewart <ericleestewart@gmail.com>
# TestFest Atlanta 2009-05-24
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$fragment = new DOMDocumentFragment();
$fragment->appendXML('<bait>crankbait</bait>');
$document->appendChild($fragment);
?>
--EXPECTF--
Fatal error: Uncaught exception 'DOMException' with message 'No Modification Allowed Error' in %s:%d
Stack trace:
#0 %s(%d): DOMDocumentFragment->appendXML('<bait>crankbait...')
#1 {main}
  thrown in %s on line %d