From 84e423300c440e96c34ada2620e0f78f827592e8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 4 Jan 2018 14:28:17 +0100 Subject: Bump a bit the coverage --- src/tests/config/disabled_functions_ret_type_null.ini | 1 + src/tests/disabled_functions_ret_type_null.phpt | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/tests/config/disabled_functions_ret_type_null.ini create mode 100644 src/tests/disabled_functions_ret_type_null.phpt (limited to 'src') diff --git a/src/tests/config/disabled_functions_ret_type_null.ini b/src/tests/config/disabled_functions_ret_type_null.ini new file mode 100644 index 0000000..70c4d69 --- /dev/null +++ b/src/tests/config/disabled_functions_ret_type_null.ini @@ -0,0 +1 @@ +sp.disable_function.function("my_function").ret_type("null").drop().alias("Return value is null"); diff --git a/src/tests/disabled_functions_ret_type_null.phpt b/src/tests/disabled_functions_ret_type_null.phpt new file mode 100644 index 0000000..1431d3a --- /dev/null +++ b/src/tests/disabled_functions_ret_type_null.phpt @@ -0,0 +1,16 @@ +--TEST-- +Disable functions check on `ret` by type matching (null). +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini +--FILE-- + +--EXPECTF-- +[snuffleupagus][0.0.0.0][disabled_function][drop] The execution has been aborted in %atests/disabled_functions_ret_type_null.php:6, because the function 'my_function' returned 'NULL', which matched the rule 'Return value is null'. -- cgit v1.3