dis-bench / src /php /php-src /ext /dom /tests /modern /xml /bug48339.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
438 Bytes
--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"/>