summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjvoisin2018-02-09 23:17:53 +0100
committerjvoisin2018-02-09 23:17:53 +0100
commitbc0a4b26581ce72af7dd3dc070feaa05ddcf953d (patch)
tree8b8b5f2803492de7caab95e0d78de17292b798ca /src
parent64845e70d120bca06dc9c0454841c1669535cc1e (diff)
Add a broken test :'(
Diffstat (limited to 'src')
-rw-r--r--src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini1
-rw-r--r--src/tests/disabled_functions_chain_call_user_func_ret.phpt26
2 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini b/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini
new file mode 100644
index 0000000..f003b7d
--- /dev/null
+++ b/src/tests/config/config_disabled_functions_chain_call_user_func_ret.ini
@@ -0,0 +1 @@
sp.disable_function.function("one>two").simulation().ret("matching_two").drop();
diff --git a/src/tests/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disabled_functions_chain_call_user_func_ret.phpt
new file mode 100644
index 0000000..e11b9ab
--- /dev/null
+++ b/src/tests/disabled_functions_chain_call_user_func_ret.phpt
@@ -0,0 +1,26 @@
1--TEST--
2Disable functions by matching the calltrace, on the return value
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini
7--FILE--
8<?php
9function two($a) {
10 echo "two\n";
11 return $a . "_two";
12}
13function one($a) {
14 echo "one\n";
15 two($a);
16 return $a . "_one";
17}
18
19echo one('not matching') . "\n";
20echo one('matching') . "\n";
21echo one('still not matching') . "\n";
22
23?>
24--EXPECTF--
25--XFAIL--
26Match on ret is broken :/