You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: This is unexpected. Just because something is enqueued late shouldn't necessitate that it be inserted right after wp-block-library and before a normal style enqueued at wp_enqueue_scripts.
1018
+
'late-css',
1019
+
'late-inline-css',
1020
+
);
1021
+
997
1022
returnarray(
998
-
'no_actions_removed' => array(
999
-
'set_up' => null,
1023
+
// TODO: Add test case for embed template.
1024
+
'standard_classic_theme_config' => array(
1025
+
'set_up' => null,
1026
+
'theme_supports' => $theme_supports,
1027
+
'expected' => $expected_head_styles,
1028
+
),
1029
+
'wp_block_styles_not_supported' => array(
1030
+
'set_up' => null,
1031
+
'theme_supports' => array(),
1032
+
// The following excludes 'wp-block-separator-inline-css' from $expected_head_styles.
1033
+
'expected' => array(
1034
+
'wp-img-auto-sizes-contain-inline-css',
1035
+
'early-css',
1036
+
'early-inline-css',
1037
+
'wp-emoji-styles-inline-css',
1038
+
'wp-block-library-css',
1039
+
'wp-block-library-inline-css',
1040
+
'late-css',
1041
+
'late-inline-css',
1042
+
1043
+
// TODO: The following three are enqueued in a different order compared to $expected_head_styles above. Why?
@@ -1031,21 +1104,52 @@ public function data_wp_hoist_late_printed_styles(): array {
1031
1104
* Tests that wp_hoist_late_printed_styles() adds a placeholder for delayed CSS, then removes it and adds all CSS to the head including late enqueued styles.
@@ -1094,19 +1198,13 @@ public function test_wp_hoist_late_printed_styles( ?Closure $set_up ): void {
1094
1198
}
1095
1199
}
1096
1200
1097
-
$expected = array(
1098
-
'early-css',
1099
-
'early-inline-css',
1100
-
'late-css',
1101
-
'late-inline-css',
1102
-
);
1103
1201
foreach ( $expectedas$style_id ) {
1104
-
$this->assertContains( $style_id, $found_styles['HEAD'], 'Expected stylesheet with ID to be in the HEAD.' );
1202
+
$this->assertContains( $style_id, $found_styles['HEAD'], 'Expected stylesheet with ID to be in the HEAD among this snapshot: ' . self::get_array_snapshot_export( $found_styles['HEAD'] ) );
0 commit comments