mirror of
https://github.com/php/php-src.git
synced 2024-10-06 01:06:14 +00:00
a3e906515c
update tests (binary string must be passed to simplexml_load_string)
40 lines
663 B
PHP
Executable File
40 lines
663 B
PHP
Executable File
--TEST--
|
|
SimpleXML: concatenating attributes
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
$xml =b<<<EOF
|
|
<people>
|
|
<person name="Foo"></person>
|
|
</people>
|
|
EOF;
|
|
|
|
$people = simplexml_load_string($xml);
|
|
var_dump($people->person['name']);
|
|
$people->person['name'] .= 'Bar';
|
|
var_dump($people->person['name']);
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
object(SimpleXMLElement)#%d (1) {
|
|
[0]=>
|
|
string(3) "Foo"
|
|
}
|
|
object(SimpleXMLElement)#%d (1) {
|
|
[0]=>
|
|
string(6) "FooBar"
|
|
}
|
|
===DONE===
|
|
--UEXPECTF--
|
|
object(SimpleXMLElement)#%d (1) {
|
|
[0]=>
|
|
unicode(3) "Foo"
|
|
}
|
|
object(SimpleXMLElement)#%d (1) {
|
|
[0]=>
|
|
unicode(6) "FooBar"
|
|
}
|
|
===DONE===
|