blob: d655479d004344fad5e5207a9df2d3a0f61c7220 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
DOMNode::insertBefore() should fail if node belongs to another document
--CREDITS--
Knut Urdalen <knut@php.net>
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$doc1 = new DOMDocument();
$doc2 = new DOMDocument();
$node_in_doc1 = $doc1->createElement("foo");
$node_in_doc2 = $doc2->createElement("bar");
try {
$node_in_doc2->insertBefore($node_in_doc1);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECTF--
Wrong Document Error
|