mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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
33 lines
644 B
PHP
33 lines
644 B
PHP
--TEST--
|
|
DOMParentNode::append() with DOMNode from wrong document throws exception
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
require_once("dom_test.inc");
|
|
|
|
$dom1 = new DOMDocument;
|
|
$dom1->loadXML('<test/>');
|
|
|
|
$dom2 = new DOMDocument;
|
|
$dom2->loadXML('<test><foo /></test>');
|
|
|
|
$element = $dom1->documentElement;
|
|
|
|
try {
|
|
$element->append($dom2->documentElement->firstChild);
|
|
echo "FAIL";
|
|
} catch (DOMException $e) {
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
|
|
try {
|
|
$element->prepend($dom2->documentElement->firstChild);
|
|
echo "FAIL";
|
|
} catch (DOMException $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Wrong Document Error
|
|
Wrong Document Error
|