From 5b25788a81bf7ad233d99cf3f5e9ce3dcc5e8602 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 2 May 2022 22:36:53 +0200 Subject: Add more tests for php8 --- .../config_disabled_functions_name_type_php8.ini | 1 + ...led_functions_param_str_representation_php8.ini | 1 + .../disabled_functions_name_type_php8.phpt | 16 ++++++++++++++ ...ed_functions_param_str_representation_php8.phpt | 25 ++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 src/tests/disable_function/config/config_disabled_functions_name_type_php8.ini create mode 100644 src/tests/disable_function/config/config_disabled_functions_param_str_representation_php8.ini create mode 100644 src/tests/disable_function/disabled_functions_name_type_php8.phpt create mode 100644 src/tests/disable_function/disabled_functions_param_str_representation_php8.phpt (limited to 'src/tests/disable_function') diff --git a/src/tests/disable_function/config/config_disabled_functions_name_type_php8.ini b/src/tests/disable_function/config/config_disabled_functions_name_type_php8.ini new file mode 100644 index 0000000..0f521e7 --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_name_type_php8.ini @@ -0,0 +1 @@ +sp.disable_function.function_r("^strcmp$").param("string1").param_type("array").drop(); diff --git a/src/tests/disable_function/config/config_disabled_functions_param_str_representation_php8.ini b/src/tests/disable_function/config/config_disabled_functions_param_str_representation_php8.ini new file mode 100644 index 0000000..710ddb3 --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_param_str_representation_php8.ini @@ -0,0 +1 @@ +sp.disable_function.function("var_export").param("value").value("bla").drop(); diff --git a/src/tests/disable_function/disabled_functions_name_type_php8.phpt b/src/tests/disable_function/disabled_functions_name_type_php8.phpt new file mode 100644 index 0000000..8670b4d --- /dev/null +++ b/src/tests/disable_function/disabled_functions_name_type_php8.phpt @@ -0,0 +1,16 @@ +--TEST-- +Disable functions +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_disabled_functions_name_type_php8.ini +--FILE-- + +--EXPECTF-- +0 + +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$string1' content (?) matched a rule in %s/disabled_functions_name_type_php8.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_str_representation_php8.phpt b/src/tests/disable_function/disabled_functions_param_str_representation_php8.phpt new file mode 100644 index 0000000..c06e612 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_param_str_representation_php8.phpt @@ -0,0 +1,25 @@ +--TEST-- +Disable functions - casting various types to string internally in php8 +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation_php8.ini +--FILE-- + +--EXPECTF-- +true +false +NULL +1 +1.0 +123 -- cgit v1.3