diff options
Diffstat (limited to 'src/tests/disabled_functions_param_int.phpt')
| -rw-r--r-- | src/tests/disabled_functions_param_int.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_param_int.phpt b/src/tests/disabled_functions_param_int.phpt new file mode 100644 index 0000000..3b2cc08 --- /dev/null +++ b/src/tests/disabled_functions_param_int.phpt | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foobar($id) { | ||
| 10 | echo $id."\n"; | ||
| 11 | } | ||
| 12 | foobar(1); | ||
| 13 | foobar(42); | ||
| 14 | foobar(1337); | ||
| 15 | foobar(13374242); | ||
| 16 | foobar(0x2A); | ||
| 17 | foobar("10"); | ||
| 18 | ?> | ||
| 19 | --EXPECTF-- | ||
| 20 | 1 | ||
| 21 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (42) matched a rule. | ||
| 22 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (1337) matched a rule. | ||
| 23 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (13374242) matched a rule. | ||
| 24 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (42) matched a rule. | ||
| 25 | 10 | ||
