1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 21:52:36 +02:00
Files
archived-php-src/ext/xml/tests/bug30875.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

41 lines
661 B
PHP

--TEST--
Bug #30875 (xml_parse_into_struct() does not resolve entities)
--SKIPIF--
<?php
if (!extension_loaded('xml')) die('skip xml extension not available');
?>
--FILE--
<?php
$xml = <<<XML
<!DOCTYPE dtd [
<!ENTITY ref "ent">
]>
<elt att="&ref;">a&ref;</elt>
XML;
$parser = xml_parser_create();
xml_parse_into_struct($parser, $xml, $vals);
xml_parser_free($parser);
var_dump($vals);
?>
--EXPECT--
array(1) {
[0]=>
array(5) {
["tag"]=>
string(3) "ELT"
["type"]=>
string(8) "complete"
["level"]=>
int(1)
["attributes"]=>
array(1) {
["ATT"]=>
string(3) "ent"
}
["value"]=>
string(4) "aent"
}
}