File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1747,17 +1747,24 @@ static function () {
17471747 /*
17481748 * Since new styles could appear at any time and since certain styles leak in from the global scope not being
17491749 * properly reset somewhere else in the test suite, we only check that the expected styles are at least present
1750- * and in the same order.
1750+ * and in the same order. When new styles are introduced in core, they may be added to this array as opposed to
1751+ * updating the arrays in the data provider, if appropriate.
17511752 */
1753+ $ ignored_styles = array (
1754+ 'core-block-supports-duotone-inline-css ' ,
1755+ 'wp-block-library-theme-css ' ,
1756+ 'wp-block-template-skip-link-inline-css ' ,
1757+ );
1758+
17521759 $ found_subset_styles = array ();
17531760 foreach ( array ( 'HEAD ' , 'BODY ' ) as $ group ) {
1754- $ found_subset_styles [ $ group ] = array_values ( array_intersect ( $ found_styles [ $ group ], $ expected_styles [ $ group ] ) );
1761+ $ found_subset_styles [ $ group ] = array_values ( array_diff ( $ found_styles [ $ group ], $ ignored_styles ) );
17551762 }
17561763
17571764 $ this ->assertSame (
17581765 $ expected_styles ,
17591766 $ found_subset_styles ,
1760- 'Expected the same styles. Snapshot: ' . self ::get_array_snapshot_export ( $ found_styles )
1767+ 'Expected the same styles. Snapshot: ' . self ::get_array_snapshot_export ( $ found_subset_styles )
17611768 );
17621769 }
17631770
You can’t perform that action at this time.
0 commit comments