Skip to content

Commit d305804

Browse files
committed
Update tests
1 parent 28faf6d commit d305804

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

tests/phpunit/tests/template.php

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,27 @@ public function data_wp_hoist_late_printed_styles(): array {
15311531
'late-inline-css',
15321532
),
15331533
),
1534+
'classic_theme_opt_out_separate_block_styles_and_no_footer_printing' => array(
1535+
'set_up' => static function () {
1536+
add_filter( 'should_load_separate_core_block_assets', '__return_false' );
1537+
add_filter( 'print_late_styles', '__return_false' );
1538+
},
1539+
'theme_supports' => $theme_supports,
1540+
'expected_head' => array(
1541+
'wp-img-auto-sizes-contain-inline-css',
1542+
'early-css',
1543+
'early-inline-css',
1544+
'wp-emoji-styles-inline-css',
1545+
'wp-block-library-css',
1546+
'wp-block-library-theme-inline-css',
1547+
'classic-theme-styles-inline-css',
1548+
'global-styles-inline-css',
1549+
'normal-css',
1550+
'normal-inline-css',
1551+
'wp-custom-css',
1552+
),
1553+
'expected_footer' => array(),
1554+
),
15341555
'wp_block_styles_not_supported' => array(
15351556
'set_up' => null,
15361557
'theme_supports' => array(),
@@ -1599,11 +1620,12 @@ function (): void {
15991620
'normal-css',
16001621
'normal-inline-css',
16011622
'wp-custom-css',
1623+
),
1624+
'expected_footer' => array(
16021625
'core-block-supports-inline-css',
16031626
'late-css',
16041627
'late-inline-css',
16051628
),
1606-
'expected_footer' => array(),
16071629
),
16081630
);
16091631
}
@@ -1646,7 +1668,7 @@ static function () {
16461668
register_core_block_style_handles();
16471669
register_core_block_types_from_metadata(); // See register_block_type_from_metadata().
16481670

1649-
$this->assertFalse( wp_is_block_theme(), 'Test is only relevant to block themes.' );
1671+
$this->assertFalse( wp_is_block_theme(), 'Test is not relevant to block themes (only classic themes).' );
16501672

16511673
// Enqueue a style early, before wp_enqueue_scripts.
16521674
wp_enqueue_style( 'early', 'https://example.com/style.css' );

0 commit comments

Comments
 (0)