diff --git a/tests/phpunit/tests/theme/base.php b/tests/phpunit/tests/theme/base.php index 182efa5df81e4..4c42fa3363b0a 100644 --- a/tests/phpunit/tests/theme/base.php +++ b/tests/phpunit/tests/theme/base.php @@ -44,6 +44,7 @@ public function tear_down() { remove_filter( 'template_root', array( $this, 'filter_set_theme_root' ) ); wp_clean_themes_cache(); + wp_clean_theme_json_cache(); unset( $GLOBALS['wp_themes'] ); parent::tear_down(); diff --git a/tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php b/tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php index 9814a6ae68c0a..7d34e8d2a6b33 100644 --- a/tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php +++ b/tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php @@ -131,6 +131,7 @@ public function test_third_party_blocks_inline_styles_get_rendered_when_per_bloc * @ticket 61165 */ public function test_blocks_inline_styles_get_rendered() { + $this->set_up_third_party_block(); wp_register_style( 'global-styles', false, array(), true, true ); wp_enqueue_style( 'global-styles' ); wp_add_global_styles_for_blocks(); @@ -174,6 +175,7 @@ public function test_third_party_blocks_inline_styles_for_elements_get_rendered_ * @ticket 61165 */ public function test_third_party_blocks_inline_styles_for_elements_get_rendered() { + $this->set_up_third_party_block(); wp_register_style( 'global-styles', false, array(), true, true ); wp_enqueue_style( 'global-styles' ); wp_add_global_styles_for_blocks();