xref: /PHP-8.4/ext/dom/tests/gh16594.phpt (revision 947e319b)
1--TEST--
2GH-16594 (Assertion failure in DOM -> before)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$v1 = new DOMText("wr");
9$v2 = new DOMDocument();
10$v6 = new DOMComment("aw");
11$v7 = new DOMAttr("r", "iL");
12
13$v9 = $v2->createElement("test");
14$v9->setAttributeNodeNS($v7);
15$v7->appendChild($v1);
16
17try {
18    $v1->before($v6);
19} catch (DOMException $e) {
20    echo $e->getMessage(), "\n";
21}
22
23?>
24--EXPECT--
25Hierarchy Request Error
26