dis-bench / src /php /php-src /ext /simplexml /tests /SimpleXMLElement_addAttribute_basic.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
366 Bytes
--TEST--
SimpleXMLElement->addAttribute()
--EXTENSIONS--
simplexml
--FILE--
<?php
$simple = simplexml_load_file(__DIR__."/book.xml");
$simple->addAttribute('type','novels');
var_dump($simple->attributes());
echo "Done";
?>
--EXPECT--
object(SimpleXMLElement)#2 (1) {
["@attributes"]=>
array(1) {
["type"]=>
string(6) "novels"
}
}
Done