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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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>