/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/dom/tests/DOM4_ParentNode_append_wrong_document.phpt
31 строка
610 B
Niels Dossche
[RFC] Add a way to opt-in ext/dom spec compliance (#13031)
09 мар 2024, 18:56
Не верифицирован
09 мар 2024, 18:56
14b6c98
Код
Авторство
О чём код?
--TEST-- DOMParentNode::append() with DOMNode from wrong document throws exception --EXTENSIONS-- dom --FILE-- <?php require_once("dom_test.inc"); function test($method) { $dom1 = new DOMDocument; $dom1->loadXML('<test/>'); $dom2 = new DOMDocument; $dom2->loadXML('<test><foo /></test>'); $element = $dom1->documentElement; try { $element->$method($dom2->documentElement->firstChild); echo "FAIL"; } catch (DOMException $e) { echo $e->getMessage() . "\n"; } } test("append"); test("prepend"); ?> --EXPECT-- Wrong Document Error Wrong Document Error