xref: /PHP-8.0/ext/dom/tests/bug79968.phpt (revision 9f6820f7)
1--TEST--
2dom: Bug #79968 - Crash when calling before without valid hierachy
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$cdata = new DOMText;
9
10try {
11    $cdata->before("string");
12} catch (DOMException $e) {
13    echo $e->getMessage();
14}
15?>
16--EXPECT--
17Hierarchy Request Error
18