Skip to content

Commit 7ff78f7

Browse files
committed
Add test case for bug #48339
This now works in spec-compliant DOM. Test by: greatwhitepine at bigfoot dot com
1 parent 94a12d5 commit 7ff78f7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #48339 (DOMElement::setIdAttribute() throws 'Not Found Error' exception)
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
$document = DOM\XMLDocument::createEmpty();
8+
$element = $document->createElement('test');
9+
$element = $document->appendChild($element);
10+
$element->setAttribute("xml:id", 1);
11+
$element->setIdAttribute("xml:id", TRUE);
12+
echo $document->saveXML(), "\n";
13+
?>
14+
--EXPECT--
15+
<?xml version="1.0" encoding="UTF-8"?>
16+
<test xml:id="1"/>

0 commit comments

Comments
 (0)