summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_ret_val_dump.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_ret_val_dump.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_ret_val_dump.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt
new file mode 100644
index 0000000..51e4f29
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Disable functions ret val - dump
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini
7--ENV--
8DOCUMENT_ROOT=a
9--POST--
10post_a=data_post_a&post_b=data_post_b
11--GET--
12get_a=data_get_a&get_b=data_get_b
13--COOKIE--
14cookie_a=data_cookie_a&cookie_b=data_cookie_b
15--FILE--
16<?php
17echo str_repeat("fufu",1)."\n";
18echo str_repeat("fufufu",1);
19?>
20--EXPECTF--
21fufu
22
23Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3