summaryrefslogtreecommitdiff
path: root/src/tests/disabled_functions_param_array_several_levels.phpt
diff options
context:
space:
mode:
authorjvoisin2017-10-27 17:22:35 +0200
committerjvoisin2017-10-27 17:22:35 +0200
commit9a0400bdbc7d4decb32fe8fa3960e9e77f9fe898 (patch)
treea27a8b5569226a4586b60876b123edc91054e9e4 /src/tests/disabled_functions_param_array_several_levels.phpt
parent70498a7cce831049b47051813b850665c5547927 (diff)
Bump the coverage
Diffstat (limited to 'src/tests/disabled_functions_param_array_several_levels.phpt')
-rw-r--r--src/tests/disabled_functions_param_array_several_levels.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_param_array_several_levels.phpt b/src/tests/disabled_functions_param_array_several_levels.phpt
new file mode 100644
index 0000000..cef6ded
--- /dev/null
+++ b/src/tests/disabled_functions_param_array_several_levels.phpt
@@ -0,0 +1,20 @@
1--TEST--
2Disable functions - match on an array value buried in several levels
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("test2"=>Array("pof"=>"pif", "foo"=>Array("lol"=>"bbb")), "a"=>"cccc");
13foo($a);
14
15$a=Array("test2"=>Array("foo"=>Array("lol"=>"aaa")), "a"=>"dddd");
16foo($a);
17?>
18--EXPECTF--
19cccc
20[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/tests/disabled_functions_param_array_several_levels.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '4'.