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:
parent
719dcd244a
commit
80fae63d57
@ -752,7 +752,7 @@ JS;
|
||||
$print_scripts // Printed scripts.
|
||||
);
|
||||
|
||||
$this->assertEquals( $expected, $print_scripts );
|
||||
$this->assertEqualsIgnoreEOL( $expected, $print_scripts );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user