diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_param.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt new file mode 100644 index 0000000..fb6dcbb --- /dev/null +++ b/src/tests/disable_function/disabled_functions_param.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 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.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | system("id"); | ||
| 10 | system("echo win"); | ||
| 11 | var_dump(array_sum([1,2,3,4,5])); | ||
| 12 | shell_exec("id"); | ||
| 13 | echo shell_exec("echo 42"); | ||
| 14 | strcmp("bla", "ble"); | ||
| 15 | strncmp("bla", "ble", 2); | ||
| 16 | ?> | ||
| 17 | --EXPECTF-- | ||
| 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file | ||
