Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Apr 26, 2022
1 parent b0e6eb9 commit 0ebba05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/php/test-amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ public function test_amp_register_default_scripts_and_styles_with_bento() {
'amp-animation' => 'v0/amp-animation-0.1.js',
'amp-apester-media' => 'v0/amp-apester-media-0.1.js',
'amp-app-banner' => 'v0/amp-app-banner-0.1.js',
'amp-audio' => 'v0/amp-audio-0.1.js',
'amp-audio' => 'v0/amp-audio-1.0.js',
'amp-auto-ads' => 'v0/amp-auto-ads-0.1.js',
'amp-autocomplete' => 'v0/amp-autocomplete-0.1.js',
'amp-base-carousel' => 'v0/amp-base-carousel-1.0.js',
Expand Down
3 changes: 3 additions & 0 deletions tests/php/validation/test-class-amp-validation-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,9 @@ public function test_add_block_source_comments( $content, $expected, $query ) {
// Remove class added in <https://github.com/WordPress/gutenberg/pull/38740> to normalize with expected data.
$rendered_block = str_replace( ' class="wp-block-latest-posts__post-title"', '', $rendered_block );

// Normalize class order.
$rendered_block = str_replace( 'wp-block-latest-posts__list wp-block-latest-posts', 'wp-block-latest-posts wp-block-latest-posts__list', $rendered_block );

$this->assertEquals(
preg_replace( '/(?<=>)\s+(?=<)/', '', str_replace( '%d', $post->ID, $expected ) ),
preg_replace( '/(?<=>)\s+(?=<)/', '', $rendered_block )
Expand Down

0 comments on commit 0ebba05

Please sign in to comment.