summaryrefslogtreecommitdiff
path: root/src/tests/eval_whitelist_simulation.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eval_whitelist_simulation.phpt')
-rw-r--r--src/tests/eval_whitelist_simulation.phpt29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/tests/eval_whitelist_simulation.phpt b/src/tests/eval_whitelist_simulation.phpt
deleted file mode 100644
index c4a3efa..0000000
--- a/src/tests/eval_whitelist_simulation.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
1--TEST--
2Eval whitelist simulation
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/eval_whitelist_simulation.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
28Warning: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7
29After eval: my_other_fun: 1234 \ No newline at end of file