1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 13:43:02 +02:00
Files
archived-php-src/ext/simplexml/tests/bug76712.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

23 lines
475 B
PHP

--TEST--
BUg #76712 (Assignment of empty string creates extraneous text node)
--SKIPIF--
<?php
if (!extension_loaded('simplexml')) die('skip simplexml not available');
?>
--FILE--
<?php
$sxe = new SimpleXMLElement('<foo></foo>');
$sxe->addChild('bar', '');
echo $sxe->asXML();
$sxe = new SimpleXMLElement('<foo></foo>');
$sxe->addChild('bar');
$sxe->bar = '';
echo $sxe->asXML();
?>
--EXPECT--
<?xml version="1.0"?>
<foo><bar/></foo>
<?xml version="1.0"?>
<foo><bar/></foo>