From 927dc8558c7f33dea1179174a3be8297a375dc55 Mon Sep 17 00:00:00 2001 From: kkadosh Date: Thu, 15 Mar 2018 10:03:37 +0000 Subject: Change a test to expected failed Apparently, we're not supporting hooking on `ret` for user-defined functions.--- src/tests/config/disabled_functions_ret.ini | 2 +- src/tests/disabled_functions_ret3.phpt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/tests') diff --git a/src/tests/config/disabled_functions_ret.ini b/src/tests/config/disabled_functions_ret.ini index 288177a..60cea82 100644 --- a/src/tests/config/disabled_functions_ret.ini +++ b/src/tests/config/disabled_functions_ret.ini @@ -3,4 +3,4 @@ sp.disable_function.function("strpos").ret("0").drop().filename_r(".*\\.not_matc sp.disable_function.function("strpos").ret("0").drop().filename_r(".*\\.php"); sp.disable_function.function_r("str[ia]pos").ret_r("^[^a-z]+$").drop(); sp.disable_function.function_r("stripos").ret_r("^[^a-z]+").drop(); -sp.disable_function.function("Bob::a").ret("0").drop(); +sp.disable_function.function("Bob::a").ret("2").drop(); diff --git a/src/tests/disabled_functions_ret3.phpt b/src/tests/disabled_functions_ret3.phpt index a705333..6a91e23 100644 --- a/src/tests/disabled_functions_ret3.phpt +++ b/src/tests/disabled_functions_ret3.phpt @@ -10,7 +10,7 @@ memory_limit=-1 class Bob { function a() { echo("We're in function `a`.\n"); - return 1; + return 2; } } $b = new Bob(); @@ -19,5 +19,6 @@ echo("We're at the end of the execution.\n"); ?> --EXPECTF-- We're in function `a`. -`a` returned: 1. -We're at the end of the execution. \ No newline at end of file +[snuffleupagus][0.0.0.0][disabled_function][drop] The execution has been aborted in %a/disabled_functions_ret3.php:9, because the return value (2) of the function 'Bob::a' matched a rule. +--XFAIL-- +Match on ret is broken for non-native functions :/ -- cgit v1.3