diff options
Diffstat (limited to 'src/tests/disabled_function_param.phpt')
| -rw-r--r-- | src/tests/disabled_function_param.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/disabled_function_param.phpt b/src/tests/disabled_function_param.phpt new file mode 100644 index 0000000..e006a4b --- /dev/null +++ b/src/tests/disabled_function_param.phpt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - match on a param | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_function_param.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function qweqwe($asd) { | ||
| 10 | echo "OK\n"; | ||
| 11 | } | ||
| 12 | |||
| 13 | $asd = Array(2); | ||
| 14 | qweqwe(Array(1)); | ||
| 15 | qweqwe(Array(2)); | ||
| 16 | ?> | ||
| 17 | --EXPECTF-- | ||
| 18 | OK | ||
| 19 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe' in %a/tests/disabled_function_param.php:%d, because its argument '$asd' content (2) matched a rule. | ||
