diff options
| author | jvoisin | 2019-01-14 19:29:25 +0000 |
|---|---|---|
| committer | GitHub | 2019-01-14 19:29:25 +0000 |
| commit | e79f7e3bd992c7f0915ef9afe7afb6d79740527a (patch) | |
| tree | f881c25694eb00da2331a9ab280ec1c24a5662ab /src/tests/eval_whitelist_include_then_user.phpt | |
| parent | c943db586ac46b686b49bdf61d8473e39dd93000 (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_include_then_user.phpt')
| -rw-r--r-- | src/tests/eval_whitelist_include_then_user.phpt | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/tests/eval_whitelist_include_then_user.phpt b/src/tests/eval_whitelist_include_then_user.phpt deleted file mode 100644 index 5ff3bff..0000000 --- a/src/tests/eval_whitelist_include_then_user.phpt +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Eval whitelist - builtin function | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | $b = 1337; | ||
| 10 | $dir = __DIR__; | ||
| 11 | |||
| 12 | file_put_contents($dir . '/test.bla', '<?php $b = sin(1) ?>'); | ||
| 13 | |||
| 14 | $a = cos(1); | ||
| 15 | echo "Outside of eval: $a\n"; | ||
| 16 | eval('$a = cos(5);'); | ||
| 17 | echo "After allowed eval: $a\n"; | ||
| 18 | eval("include_once('$dir' . '/test.bla');"); | ||
| 19 | echo "After eval: $b\n"; | ||
| 20 | ?> | ||
| 21 | --CLEAN-- | ||
| 22 | <?php | ||
| 23 | $dir = __DIR__; | ||
| 24 | unlink($dir . '/test.bla'); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | Outside of eval: 0.54030230586814 | ||
| 28 | After allowed eval: 0.28366218546323 | ||
| 29 | |||
| 30 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file | ||
