Skip to content

Commit

Permalink
Fix test cases for YouTube embed handler
Browse files Browse the repository at this point in the history
  • Loading branch information
thelovekesh committed Jun 20, 2022
1 parent f0184f1 commit d4705ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/php/test-class-amp-youtube-embed-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ public function test__conversion( $source, $expected, $fallback_for_expected = n
version_compare( strtok( get_bloginfo( 'version' ), '-' ), '5.1', '<' )
&& null !== $fallback_for_expected
) {
// Remove the title or alt attribute from $filtered_content if it exists.
$filtered_content = preg_replace( '/ title="[^"]*"/', '', $filtered_content );
$filtered_content = preg_replace( '/ alt="[^"]*"/', '', $filtered_content );

$this->assertEqualMarkup( $fallback_for_expected, $filtered_content );
} else {
$this->assertEqualMarkup( $expected, $filtered_content );
Expand Down

0 comments on commit d4705ee

Please sign in to comment.