Skip to content

Commit

Permalink
Fix libxml test compatibility in xsl
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Jul 6, 2024
1 parent 477c2af commit f4af8f3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions ext/xsl/tests/registerPHPFunctionNS.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ echo "--- Legit cases: none ---\n";

$proc = createProcessor(["foo:var_dump(string(@href))"]);
try {
$proc->transformToXml($inputdom);
// Note: since libxml2 commit aca16fb3d45e0b2c45364ffc1cea8eb4abaca87d this only outputs 1 warning. This seems intentional.
// Easiest workaround is silencing the warnings
@$proc->transformToXml($inputdom);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
Expand Down Expand Up @@ -90,14 +92,6 @@ var_dump($proc->transformToXml($inputdom));
?>
--EXPECTF--
--- Legit cases: none ---

Warning: XSLTProcessor::transformToXml(): xmlXPathCompOpEval: function var_dump not found in %s on line %d

Warning: XSLTProcessor::transformToXml(): Unregistered function in %s on line %d

Warning: XSLTProcessor::transformToXml(): runtime error: file %s line 6 element value-of in %s on line %d

Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d
--- Legit cases: global function callable ---
string(15) "https://php.net"
--- Legit cases: global string callable ---
Expand Down

0 comments on commit f4af8f3

Please sign in to comment.