summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorkkadosh2018-03-15 10:03:37 +0000
committerjvoisin2018-03-15 11:03:37 +0100
commit927dc8558c7f33dea1179174a3be8297a375dc55 (patch)
treef4802e347087ecaad4ed9bfa8c9ea857b9f1fcad /src/tests
parentcba2c980e7485838831061287aa78eb989290d1c (diff)
Change a test to expected failed
Apparently, we're not supporting hooking on `ret` for user-defined functions.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/config/disabled_functions_ret.ini2
-rw-r--r--src/tests/disabled_functions_ret3.phpt7
2 files changed, 5 insertions, 4 deletions
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
3sp.disable_function.function("strpos").ret("0").drop().filename_r(".*\\.php"); 3sp.disable_function.function("strpos").ret("0").drop().filename_r(".*\\.php");
4sp.disable_function.function_r("str[ia]pos").ret_r("^[^a-z]+$").drop(); 4sp.disable_function.function_r("str[ia]pos").ret_r("^[^a-z]+$").drop();
5sp.disable_function.function_r("stripos").ret_r("^[^a-z]+").drop(); 5sp.disable_function.function_r("stripos").ret_r("^[^a-z]+").drop();
6sp.disable_function.function("Bob::a").ret("0").drop(); 6sp.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
10class Bob { 10class Bob {
11 function a() { 11 function a() {
12 echo("We're in function `a`.\n"); 12 echo("We're in function `a`.\n");
13 return 1; 13 return 2;
14 } 14 }
15} 15}
16$b = new Bob(); 16$b = new Bob();
@@ -19,5 +19,6 @@ echo("We're at the end of the execution.\n");
19?> 19?>
20--EXPECTF-- 20--EXPECTF--
21We're in function `a`. 21We're in function `a`.
22`a` returned: 1. 22[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.
23We're at the end of the execution. \ No newline at end of file 23--XFAIL--
24Match on ret is broken for non-native functions :/