From 1099bce4b1ee13395181a78f67acf5e47c9495e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Thu, 27 Oct 2022 10:40:40 +0200 Subject: [PATCH] Make block styles be loaded in a separate stylesheet --- tests/phpunit/tests/theme/wpGetGlobalStylesForBlocks.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/theme/wpGetGlobalStylesForBlocks.php b/tests/phpunit/tests/theme/wpGetGlobalStylesForBlocks.php index ca7e822641588..627c4fc82d090 100644 --- a/tests/phpunit/tests/theme/wpGetGlobalStylesForBlocks.php +++ b/tests/phpunit/tests/theme/wpGetGlobalStylesForBlocks.php @@ -72,6 +72,10 @@ public function filter_set_theme_root() { public function test_styles_for_blocks() { switch_theme( 'block-theme' ); + // The 3rd party block styles are only missing + // if the assets are loaded per block. + add_filter( 'should_load_separate_core_block_assets', '__return_true' ); + $name = 'my/third-party-block'; $settings = array( 'icon' => 'text',