From 8b5b551f18f1fa656d87db64d51ffbe21d915b73 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 17 Mar 2022 10:28:39 -0700 Subject: [PATCH] Account for variance in tests for CSS generated by postcss after #6980 --- tests/php/test-amp-style-sanitizer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/php/test-amp-style-sanitizer.php b/tests/php/test-amp-style-sanitizer.php index ab7497525c0..e2a92bafe25 100644 --- a/tests/php/test-amp-style-sanitizer.php +++ b/tests/php/test-amp-style-sanitizer.php @@ -3495,6 +3495,7 @@ function( $original_dom, $original_source, $amphtml_dom, $amphtml_source ) { $this->assertStringContainsString( '.wp-block-audio figcaption', $amphtml_source, 'Expected block-library/style.css' ); $this->assertStringContainsString( '[class^="wp-block-"]:not(.wp-block-gallery) figcaption', $amphtml_source, 'Expected twentyten/blocks.css' ); + $amphtml_source = preg_replace( '/\s*>\s*/', '>', $amphtml_source ); // Account for variance in postcss. $this->assertStringContainsString( '.amp-wp-default-form-message>p', $amphtml_source, 'Expected amp-default.css' ); $this->assertStringContainsString( 'ab-empty-item', $amphtml_source, 'Expected admin-bar.css to still be present.' ); $this->assertStringNotContainsString( 'earlyprintstyle', $amphtml_source, 'Expected early print style to not be present.' );