1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add a test for setting the innerHTML on a prefixed XML element (#15204)

This commit is contained in:
Niels Dossche
2024-08-03 00:14:04 +02:00
committed by GitHub
parent 76ad89ccff
commit e119c72894

View File

@@ -0,0 +1,13 @@
--TEST--
Test setting innerHTML on a prefixed element
--EXTENSIONS--
dom
--FILE--
<?php
$dom = Dom\XMLDocument::createFromString('<x:root xmlns:x="urn:x"/>');
$dom->documentElement->innerHTML = '<child><x:subchild/></child>';
echo $dom->saveXML();
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<x:root xmlns:x="urn:x"><child><x:subchild/></child></x:root>