xref: /PHP-5.4/ext/dom/tests/bug47849.phpt (revision f0b4c7be)
1--TEST--
2Bug #47849 (Non-deep import loses the namespace).
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$aDOM= new DOMDocument();
9$aDOM->appendChild($aDOM->createElementNS('urn::root','r:root'));
10
11$fromdom= new DOMDocument();
12$fromdom->loadXML('<data xmlns="urn::data">aaa</data>');
13
14$data= $fromdom->documentElement;
15$aDOM->documentElement->appendChild($aDOM->importNode($data));
16
17echo $aDOM->saveXML();
18
19?>
20--EXPECT--
21<?xml version="1.0"?>
22<r:root xmlns:r="urn::root"><data xmlns="urn::data"/></r:root>
23