Make WordPress Core

Changeset 53319


Ignore:
Timestamp:
04/30/2022 11:33:30 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Ignore EOL differences in Webfonts API tests.

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

Includes renaming the test class to match the naming conventions.

Follow-up to [46612], [48443], [48466], [49691], [51135], [53282].

See #54725.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/webfonts/wpThemeJsonWebfontsHandler.php

    r53282 r53319  
    33 * Enqueue only webfonts listed in theme.json
    44 *
    5  * @package  WordPress
     5 * @package WordPress
    66 */
    77
     
    1313 * @covers _wp_theme_json_webfonts_handler
    1414 */
    15 class Test_WebfontsApi_WpThemeJsonWebfontsHandler extends WP_UnitTestCase {
     15class Tests_Webfonts_wpThemeJsonWebfontsHandler extends WP_UnitTestCase {
    1616
    1717    /**
     
    8787EOF;
    8888        $expected = str_replace( 'THEME_ROOT_URL', get_stylesheet_directory_uri(), $expected );
     89        $expected = str_replace( "\r\n", "\n", $expected );
    8990
    9091        $this->assertStringContainsString(
Note: See TracChangeset for help on using the changeset viewer.