summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/bug41175.phpt
blob: 432f217b16a299a2ff4d41b3223b1d0693331c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #41175 (addAttribute() fails to add an attribute with an empty value)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php

$xml = new SimpleXmlElement("<img></img>");
$xml->addAttribute("src", "foo");
$xml->addAttribute("alt", "");
echo $xml->asXML();

?>
===DONE===
--EXPECT--
<?xml version="1.0"?>
<img src="foo" alt=""/>
===DONE===