diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_ret3.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_ret3.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt new file mode 100644 index 0000000..dc60c43 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_ret3.phpt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions check on `ret`. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | ||
| 7 | memory_limit=-1 | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | class Bob { | ||
| 11 | function a() { | ||
| 12 | echo("We're in function `a`.\n"); | ||
| 13 | return 2; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | $b = new Bob(); | ||
| 17 | echo "`a` returned: " . $b->a() . ".\n"; | ||
| 18 | echo("We're at the end of the execution.\n"); | ||
| 19 | ?> | ||
| 20 | --EXPECTF-- | ||
| 21 | We're in function `a`. | ||
| 22 | |||
| 23 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file | ||
