From 868f96c759b6650d88ff9f4fbc5c048302134248 Mon Sep 17 00:00:00 2001 From: Sebastien Blot Date: Wed, 20 Sep 2017 10:11:01 +0200 Subject: Initial import --- src/tests/disabled_functions_param_array.phpt | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/tests/disabled_functions_param_array.phpt (limited to 'src/tests/disabled_functions_param_array.phpt') 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 @@ +--TEST-- +Disable functions +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini +--FILE-- +"test1"); +foo($a); +$a=Array("a"=>"abcd"); +foo($a); +$a=Array("a"=>"abcde"); +foo($a); +$a=Array("bla"=>"abcdef"); +foo($a); +$a=Array("bla"=>"aaa", "a"=>"eee" ); +foo($a); +$a=Array("test"=>"aaa", "a"=>"fff" ); +foo($a); +$a=Array("test2"=>Array("foo"=>Array("lol"=>"bbb")), "a"=>"cccc"); +foo($a); +$a=Array("test2"=>Array("foo"=>Array("lol"=>"aaa")), "a"=>"dddd"); +foo($a); +?> +--EXPECTF-- +test1 +[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'. +abcde +[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'. +eee +[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'. +cccc +[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'. -- cgit v1.3