1--TEST--
2Dom\Element::setAttributeNode(NS) inuse error
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom1 = Dom\HTMLDocument::createEmpty();
9$container = $dom1->appendChild($dom1->createElement("container"));
10$attr1 = $dom1->createAttribute("my-attribute");
11$attr1->value = "1";
12$container->setAttributeNode($attr1);
13$element = $container->appendChild($dom1->createElement("element"));
14try {
15    $element->setAttributeNode($attr1);
16} catch (DOMException $e) {
17    echo $e->getMessage(), "\n";
18}
19echo $dom1->saveHtml(), "\n";
20
21?>
22--EXPECT--
23Inuse Attribute Error
24<container my-attribute="1"><element></element></container>
25