From caae950ff7b5257a8cec8120260cfca043c7eda1 Mon Sep 17 00:00:00 2001 From: Gina Peter Bnayard Date: Sun, 11 Aug 2024 15:00:08 +0200 Subject: [PATCH] ext/xml: Add an explicit test case about unsetting a handler with empty string --- .../set_handler_deprecation_empty_string.phpt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ext/xml/tests/set_handler_deprecation_empty_string.phpt diff --git a/ext/xml/tests/set_handler_deprecation_empty_string.phpt b/ext/xml/tests/set_handler_deprecation_empty_string.phpt new file mode 100644 index 00000000000..9325efcc495 --- /dev/null +++ b/ext/xml/tests/set_handler_deprecation_empty_string.phpt @@ -0,0 +1,25 @@ +--TEST-- +Unsetting a handler via an empty string should emit a deprecation +--EXTENSIONS-- +xml +--FILE-- +getMessage(), PHP_EOL; +} + +?> +END +--EXPECTF-- +Deprecated: xml_set_processing_instruction_handler(): Passing non-callable strings is deprecated since 8.4 in %s on line %d +END