summaryrefslogtreecommitdiff
path: root/src/tests/disabled_functions_param_array.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disabled_functions_param_array.phpt')
-rw-r--r--src/tests/disabled_functions_param_array.phpt37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_param_array.phpt b/src/tests/disabled_functions_param_array.phpt
new file mode 100644
index 0000000..6596d1a
--- /dev/null
+++ b/src/tests/disabled_functions_param_array.phpt
@@ -0,0 +1,37 @@
1--TEST--
2Disable functions
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini
7--FILE--
8<?php
9function foo($arr) {
10 echo $arr["a"]."\n";
11}
12$a=Array("a"=>"test1");
13foo($a);
14$a=Array("a"=>"abcd");
15foo($a);
16$a=Array("a"=>"abcde");
17foo($a);
18$a=Array("bla"=>"abcdef");
19foo($a);
20$a=Array("bla"=>"aaa", "a"=>"eee" );
21foo($a);
22$a=Array("test"=>"aaa", "a"=>"fff" );
23foo($a);
24$a=Array("test2"=>Array("foo"=>Array("lol"=>"bbb")), "a"=>"cccc");
25foo($a);
26$a=Array("test2"=>Array("foo"=>Array("lol"=>"aaa")), "a"=>"dddd");
27foo($a);
28?>
29--EXPECTF--
30test1
31[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '1'.
32abcde
33[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '2'.
34eee
35[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '3'.
36cccc
37[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '4'.