1--TEST--
2DOMParentNode::append() with attributes
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7require_once("dom_test.inc");
8
9$dom = new DOMDocument;
10$dom->loadXML('<test attr-one="21"/>');
11
12$replacement = $dom->createAttribute('attr-one');
13$replacement->value ='42';
14$addition = $dom->createAttribute('attr-two');
15$addition->value = '23';
16
17$element = $dom->documentElement;
18
19try {
20    $element->append($replacement, $addition);
21} catch (DOMException $e) {
22    echo $e->getMessage() . "\n";
23}
24
25echo $dom->saveXML();
26?>
27--EXPECT--
28Hierarchy Request Error
29<?xml version="1.0"?>
30<test attr-one="21"/>
31