summaryrefslogtreecommitdiff
path: root/src/tests/eval_whitelist.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/eval_whitelist.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/eval_whitelist.phpt')
-rw-r--r--src/tests/eval_whitelist.phpt28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/tests/eval_whitelist.phpt b/src/tests/eval_whitelist.phpt
deleted file mode 100644
index a602d0d..0000000
--- a/src/tests/eval_whitelist.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
1--TEST--
2Eval whitelist
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/eval_whitelist.ini
7--FILE--
8<?php
9function my_fun($p) {
10 return "my_fun: $p";
11}
12
13function my_other_fun($p) {
14 return "my_other_fun: $p";
15}
16
17$a = my_fun("1337 1337 1337");
18echo "Outside of eval: $a\n";
19eval('$a = my_fun("1234");');
20echo "After allowed eval: $a\n";
21eval('$a = my_other_fun("1234");');
22echo "After eval: $a\n";
23?>
24--EXPECTF--
25Outside of eval: my_fun: 1337 1337 1337
26After allowed eval: my_fun: 1234
27
28Fatal error: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file