diff --git a/tests/validation/test-class-amp-validation-manager.php b/tests/validation/test-class-amp-validation-manager.php index 169cf273e45..8f75225e238 100644 --- a/tests/validation/test-class-amp-validation-manager.php +++ b/tests/validation/test-class-amp-validation-manager.php @@ -726,7 +726,7 @@ public function get_block_data() { 'latest_posts' => array( '', sprintf( - '
', + '', $is_gutenberg ? 'plugin' : 'core', $is_gutenberg ? 'gutenberg' : 'wp-includes', $latest_posts_block->render_callback @@ -788,6 +788,14 @@ public function test_add_block_source_comments( $content, $expected, $query ) { ), $expected ); + + // Temporary patch to support running unit tests in Gutenberg<5.7.0. + $expected = str_replace( + 'class="wp-block-latest-posts"', + 'class="wp-block-latest-posts wp-block-latest-posts__list"', + $expected + ); + $this->assertEquals( preg_replace( '/(?<=>)\s+(?=<)/', '', str_replace( '%d', $post->ID, $expected ) ), preg_replace( '/(?<=>)\s+(?=<)/', '', $rendered_block )