Skip to content

Commit

Permalink
Account for CSS changes in twentyten theme
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Aug 22, 2024
1 parent c0f05a0 commit 296c233
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/php/test-amp-style-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3524,11 +3524,11 @@ function ( $original_dom, $original_source, $amphtml_dom, $amphtml_source ) {
$this->assertStringContainsString( '.wp-block-audio figcaption', $amphtml_source, 'Expected block-library/style.css' );
}

if ( version_compare( strtok( get_bloginfo( 'version' ), '-' ), '6.6', '>=' ) ) {
$this->assertStringContainsString( '[class^="wp-block-"]:not(.wp-block-gallery) > figcaption', $amphtml_source, 'Expected twentyten/blocks.css' );
} else {
$this->assertStringContainsString( '[class^="wp-block-"]:not(.wp-block-gallery) figcaption', $amphtml_source, 'Expected twentyten/blocks.css' );
}
$this->assertStringContainsString(
'[class^="wp-block-"]:not(.wp-block-gallery) figcaption',
str_replace( '> figcaption', 'figcaption', $amphtml_source ), // Account for recent CSS changes.
'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' );
Expand Down

0 comments on commit 296c233

Please sign in to comment.