diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini | 1 | ||||
| -rw-r--r-- | src/tests/disable_function/disabled_functions_chain_call_skip.phpt | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini new file mode 100644 index 0000000..4d2f68d --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("a>c").simulation().drop(); | |||
diff --git a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt new file mode 100644 index 0000000..9ff84b9 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions by matching the calltrace, with a superfluous function in between | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_skip.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | |||
| 10 | function a() { | ||
| 11 | echo "I'm in the `a` function!\n"; | ||
| 12 | b(); | ||
| 13 | } | ||
| 14 | function b() { | ||
| 15 | echo "I'm in the `b` function!\n"; | ||
| 16 | c(); | ||
| 17 | } | ||
| 18 | function c() { | ||
| 19 | echo "I'm in the `c` function!\n"; | ||
| 20 | } | ||
| 21 | |||
| 22 | a(); | ||
| 23 | ?> | ||
| 24 | --EXPECTF-- | ||
| 25 | I'm in the `a` function! | ||
| 26 | I'm in the `b` function! | ||
| 27 | |||
| 28 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a>c' in %s/tests/disable_function/disabled_functions_chain_call_skip.php on line 12 | ||
| 29 | I'm in the `c` function! | ||
