summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_local_var_10.phpt
diff options
context:
space:
mode:
authorjvoisin2019-01-14 19:29:25 +0000
committerGitHub2019-01-14 19:29:25 +0000
commite79f7e3bd992c7f0915ef9afe7afb6d79740527a (patch)
treef881c25694eb00da2331a9ab280ec1c24a5662ab /src/tests/disable_function/disabled_function_local_var_10.phpt
parentc943db586ac46b686b49bdf61d8473e39dd93000 (diff)
Reorganize the testsuite
Splitting the testsuite in several components makes it easier to manage and comprehend. This was also needed some some tests aren't passing on Alpine Linux, but we still want to run as many of them as we can on this platform.
Diffstat (limited to 'src/tests/disable_function/disabled_function_local_var_10.phpt')
-rw-r--r--src/tests/disable_function/disabled_function_local_var_10.phpt45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt
new file mode 100644
index 0000000..4902972
--- /dev/null
+++ b/src/tests/disable_function/disabled_function_local_var_10.phpt
@@ -0,0 +1,45 @@
1--TEST--
2Disable functions - match on a local variable
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/disabled_function_local_var.ini
7--FILE--
8<?php
9$qwe = Array('123' => Array('qwe'), '456' => Array('no block this'));
10var_dump($qwe);
11strlen("qwe");
12$qwe = Array('123' => Array('qwe'), '456' => Array(Array('block this')));
13var_dump($qwe);
14strlen("qwe");
15?>
16--EXPECTF--
17array(2) {
18 [123]=>
19 array(1) {
20 [0]=>
21 string(3) "qwe"
22 }
23 [456]=>
24 array(1) {
25 [0]=>
26 string(13) "no block this"
27 }
28}
29array(2) {
30 [123]=>
31 array(1) {
32 [0]=>
33 string(3) "qwe"
34 }
35 [456]=>
36 array(1) {
37 [0]=>
38 array(1) {
39 [0]=>
40 string(10) "block this"
41 }
42 }
43}
44
45Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file