From f290c263297a5f312ae8f000a88bc56f7fcffb77 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Fri, 14 Feb 2025 09:09:44 -0800 Subject: [PATCH] Use static callbacks in tests. Co-authored-by: Mukesh Panchal --- .../tests/speculative-loading/wpPrintSpeculationRules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/speculative-loading/wpPrintSpeculationRules.php b/tests/phpunit/tests/speculative-loading/wpPrintSpeculationRules.php index 3945fe16b1a3b..e2887f8b0b6ce 100644 --- a/tests/phpunit/tests/speculative-loading/wpPrintSpeculationRules.php +++ b/tests/phpunit/tests/speculative-loading/wpPrintSpeculationRules.php @@ -43,7 +43,7 @@ public function test_wp_print_speculation_rules_with_html5_support() { add_filter( 'wp_speculation_rules_configuration', - function () { + static function () { return array( 'mode' => 'prerender', 'eagerness' => 'moderate', @@ -70,7 +70,7 @@ public function test_wp_print_speculation_rules_without_html5_support() { add_filter( 'wp_speculation_rules_configuration', - function () { + static function () { return array( 'mode' => 'prerender', 'eagerness' => 'moderate',