mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add test case for bug #48339
This now works in spec-compliant DOM. Test by: greatwhitepine at bigfoot dot com
This commit is contained in:
16
ext/dom/tests/modern/xml/bug48339.phpt
Normal file
16
ext/dom/tests/modern/xml/bug48339.phpt
Normal file
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #48339 (DOMElement::setIdAttribute() throws 'Not Found Error' exception)
|
||||
--EXTENSIONS--
|
||||
dom
|
||||
--FILE--
|
||||
<?php
|
||||
$document = DOM\XMLDocument::createEmpty();
|
||||
$element = $document->createElement('test');
|
||||
$element = $document->appendChild($element);
|
||||
$element->setAttribute("xml:id", 1);
|
||||
$element->setIdAttribute("xml:id", TRUE);
|
||||
echo $document->saveXML(), "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<test xml:id="1"/>
|
||||
Reference in New Issue
Block a user