xref: /PHP-8.3/ext/xmlwriter/tests/bug79344.phpt (revision 74859783)
1--TEST--
2FR #79344 (xmlwriter_write_attribute_ns: $prefix should be nullable)
3--EXTENSIONS--
4xmlwriter
5--FILE--
6<?php
7$writer = new XMLWriter;
8$writer->openMemory();
9$writer->setIndent(true);
10$writer->startElement('foo');
11
12$writer->writeAttributeNS(null, 'test1', null, 'test1');
13$writer->startAttributeNS(null, 'test2', null);
14$writer->text('test2');
15$writer->endAttribute();
16
17$writer->endElement();
18echo $writer->outputMemory();
19?>
20--EXPECT--
21<foo test1="test1" test2="test2"/>
22