Make WordPress Core

Changeset 48466


Ignore:
Timestamp:
07/14/2020 01:40:33 AM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r48324 r48466  
    753753                );
    754754
    755                 $this->assertEquals( $expected, $print_scripts );
     755                $this->assertEqualsIgnoreEOL( $expected, $print_scripts );
    756756        }
    757757
  • trunk/tests/phpunit/tests/functions/cleanupHeaderComment.php

    r47780 r48466  
    1818         */
    1919        public function test_cleanup_header_comment( $test_string, $expected ) {
    20                 $this->assertEquals( $expected, _cleanup_header_comment( $test_string ) );
     20                $this->assertEqualsIgnoreEOL( $expected, _cleanup_header_comment( $test_string ) );
    2121        }
    2222
Note: See TracChangeset for help on using the changeset viewer.