summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_ret_simulation.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_ret_simulation.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_ret_simulation.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt
new file mode 100644
index 0000000..bd4cea0
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt
@@ -0,0 +1,20 @@
1--TEST--
2Disable functions check on `ret` simulation
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini
7--FILE--
8<?php
9echo strpos("pouet", "p") . "\n";
10echo stripos("pouet", "p") . "\n";
11strcmp("p", "p") . "\n";
12?>
13--EXPECTF--
14Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2
150
16
17Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3
180
19
20Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file