Skip to content

Commit 6310aca

Browse files
committed
XPath test addition
1 parent ef416fa commit 6310aca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/dom/tests/domxpath.phpt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,17 @@ try {
5757
} catch (\Error $e) {
5858
echo $e->getMessage() . \PHP_EOL;
5959
}
60+
try {
61+
$xpath->registerPhpFunctions(['non_existant']);
62+
$avg = $xpath->evaluate('number(php:function("non_existent", //def:testnode))');
63+
} catch (\Error $e) {
64+
echo $e->getMessage() . \PHP_EOL;
65+
}
6066
?>
6167
--EXPECT--
6268
myval
6369
float(1)
6470
bool(true)
6571
float(4)
6672
Unable to call handler non_existent()
73+
Unable to call handler non_existent()

0 commit comments

Comments
 (0)