mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix GH-13517: Multiple test failures when building with --with-expat
The reflection failure is because the XML extension is used to check the module dependency information, but that extension can be configured to not depend on ext/libxml, resulting in a different output. The solution is to check another extension instead. The test failures in ext/xml/tests are because of different behaviour between libxml2 and Expat error handling. These are expected differences and the solution is to split the tests. Closes GH-13522.
This commit is contained in:
parent
b4e272c56a
commit
552ea62e1f
15 changed files with 209 additions and 267 deletions
17
ext/xml/tests/xml_error_string_basic.inc
Normal file
17
ext/xml/tests/xml_error_string_basic.inc
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
$xmls = array(
|
||||
'<?xml version="1.0"?><element>',
|
||||
'<?xml>',
|
||||
'<?xml version="dummy">',
|
||||
'<?xml?>',
|
||||
'<?xml version="1.0"?><elem></element>',
|
||||
);
|
||||
|
||||
foreach ($xmls as $xml) {
|
||||
$xml_parser = xml_parser_create();
|
||||
if (!xml_parse($xml_parser, $xml, true)) {
|
||||
var_dump(xml_get_error_code($xml_parser));
|
||||
var_dump(xml_error_string(xml_get_error_code($xml_parser)));
|
||||
}
|
||||
xml_parser_free($xml_parser);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue