diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini | 1 | ||||
| -rw-r--r-- | src/tests/disabled_functions_chain_call_user_func_ret.phpt | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini b/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini new file mode 100644 index 0000000..f003b7d --- /dev/null +++ b/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("one>two").simulation().ret("matching_two").drop(); | |||
diff --git a/src/tests/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disabled_functions_chain_call_user_func_ret.phpt new file mode 100644 index 0000000..e11b9ab --- /dev/null +++ b/src/tests/disabled_functions_chain_call_user_func_ret.phpt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions by matching the calltrace, on the return value | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function two($a) { | ||
| 10 | echo "two\n"; | ||
| 11 | return $a . "_two"; | ||
| 12 | } | ||
| 13 | function one($a) { | ||
| 14 | echo "one\n"; | ||
| 15 | two($a); | ||
| 16 | return $a . "_one"; | ||
| 17 | } | ||
| 18 | |||
| 19 | echo one('not matching') . "\n"; | ||
| 20 | echo one('matching') . "\n"; | ||
| 21 | echo one('still not matching') . "\n"; | ||
| 22 | |||
| 23 | ?> | ||
| 24 | --EXPECTF-- | ||
| 25 | --XFAIL-- | ||
| 26 | Match on ret is broken :/ | ||
