diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_ret_simulation.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_ret_simulation.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt new file mode 100644 index 0000000..bd4cea0 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions check on `ret` simulation | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | echo strpos("pouet", "p") . "\n"; | ||
| 10 | echo stripos("pouet", "p") . "\n"; | ||
| 11 | strcmp("p", "p") . "\n"; | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 | ||
| 15 | 0 | ||
| 16 | |||
| 17 | Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 | ||
| 18 | 0 | ||
| 19 | |||
| 20 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file | ||
