diff options
| author | jvoisin | 2018-02-06 15:17:00 +0100 |
|---|---|---|
| committer | jvoisin | 2018-02-06 15:17:00 +0100 |
| commit | 07245d709e4dd9f8467f724b4d61ae55a5446aa9 (patch) | |
| tree | 9172c328905077929342bfe80baba00d0fa92915 | |
| parent | 24276c548e5ac03e167a2ded7f8927ae5466d449 (diff) | |
Add a test to make sure that arrays are correctly handled
| -rw-r--r-- | src/tests/config/disabled_function_local_var_array_not_array.ini | 1 | ||||
| -rw-r--r-- | src/tests/disabled_functions_local_var_array_not_array.phpt | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/config/disabled_function_local_var_array_not_array.ini b/src/tests/config/disabled_function_local_var_array_not_array.ini new file mode 100644 index 0000000..ea25d1f --- /dev/null +++ b/src/tests/config/disabled_function_local_var_array_not_array.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("foobar").var("a").value("test").drop().simulation(); | |||
diff --git a/src/tests/disabled_functions_local_var_array_not_array.phpt b/src/tests/disabled_functions_local_var_array_not_array.phpt new file mode 100644 index 0000000..54e8719 --- /dev/null +++ b/src/tests/disabled_functions_local_var_array_not_array.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foobar($a) { | ||
| 10 | var_dump($a); | ||
| 11 | } | ||
| 12 | $a = ["lol"=>2, "test"=>1]; | ||
| 13 | foobar("test"); | ||
| 14 | |||
| 15 | ?> | ||
| 16 | --EXPECTF-- | ||
| 17 | string(4) "test" | ||
