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',