xref: /php-src/ext/dom/tests/gh15910.phpt (revision 55aa5f3f)
1--TEST--
2GH-15910 (Assertion failure in ext/dom/element.c)
3--EXTENSIONS--
4dom
5--CREDITS--
6YuanchengJiang
7--FILE--
8<?php
9$doc = new DOMDocument();
10$doc->appendChild($doc->createElement('container'));
11try {
12    $doc->documentElement->setAttributeNodeNS($doc);
13} catch (Error $e) {
14    echo $e->getMessage(), "\n";
15}
16?>
17--EXPECT--
18DOMElement::setAttributeNodeNS(): Argument #1 ($attr) must be of type DOMAttr, DOMDocument given
19