1--TEST--
2Dom\Node::appendChild() with attribute should fail
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createEmpty();
9
10$element = $dom->createElement('foo');
11$attr = $dom->createAttribute('bar');
12$attr->value = "hello";
13try {
14    $element->appendChild($attr);
15} catch (DOMException $e) {
16    echo $e->getMessage(), "\n";
17}
18
19var_dump($attr->value);
20
21?>
22--EXPECT--
23Hierarchy Request Error
24string(5) "hello"
25