From 45fbbe6975265a7596264fdb79ab2c29a20cd44f Mon Sep 17 00:00:00 2001 From: Kamran Abdul Aziz Date: Sat, 21 Nov 2026 19:44:04 +0530 Subject: [PATCH] Tests: Reset `$wp_styles` around the `Tests_Embed_Template` tests. See #66755. --- tests/phpunit/tests/oembed/template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/oembed/template.php b/tests/phpunit/tests/oembed/template.php index 3675191ddd020..ef9951e2b731c 100644 --- a/tests/phpunit/tests/oembed/template.php +++ b/tests/phpunit/tests/oembed/template.php @@ -10,8 +10,9 @@ public function set_up() { $this->set_permalink_structure( '' ); - global $wp_scripts; + global $wp_scripts, $wp_styles; $wp_scripts = null; + $wp_styles = null; // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present: self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); @@ -23,8 +24,9 @@ public function set_up() { public function tear_down() { parent::tear_down(); - global $wp_scripts; + global $wp_scripts, $wp_styles; $wp_scripts = null; + $wp_styles = null; } /**