xref: /PHP-8.4/ext/dom/tests/modern/xml/bug48339.phpt (revision 6e7adb3c)
1--TEST--
2Bug #48339 (DOMElement::setIdAttribute() throws 'Not Found Error' exception)
3--EXTENSIONS--
4dom
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);
12echo $document->saveXml(), "\n";
13?>
14--EXPECT--
15<?xml version="1.0" encoding="UTF-8"?>
16<test xml:id="1"/>
17