Tests: Ignore EOL differences in some tests using multiline string assertions.

Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Follow-up to [46612], [48443].

See #31432.

git-svn-id: https://develop.svn.wordpress.org/trunk@48466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-14 01:40:33 +00:00
parent 719dcd244a
commit 80fae63d57
2 changed files with 2 additions and 2 deletions

View File

@ -752,7 +752,7 @@ JS;
$print_scripts // Printed scripts.
);
$this->assertEquals( $expected, $print_scripts );
$this->assertEqualsIgnoreEOL( $expected, $print_scripts );
}
/**

View File

@ -17,7 +17,7 @@ class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase {
* @param string $expected
*/
public function test_cleanup_header_comment( $test_string, $expected ) {
$this->assertEquals( $expected, _cleanup_header_comment( $test_string ) );
$this->assertEqualsIgnoreEOL( $expected, _cleanup_header_comment( $test_string ) );
}
/**