mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
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 [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization naming conventions]. Follow-up to [46612], [48443], [48466], [49691], [51135], [53282]. See #54725. git-svn-id: https://develop.svn.wordpress.org/trunk@53319 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
84be1644cd
commit
6eeaa587e7
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Enqueue only webfonts listed in theme.json
|
||||
*
|
||||
* @package WordPress
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -12,7 +12,7 @@
|
||||
* @group themes
|
||||
* @covers _wp_theme_json_webfonts_handler
|
||||
*/
|
||||
class Test_WebfontsApi_WpThemeJsonWebfontsHandler extends WP_UnitTestCase {
|
||||
class Tests_Webfonts_wpThemeJsonWebfontsHandler extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* WP_Styles instance reference
|
||||
@ -86,6 +86,7 @@ class Test_WebfontsApi_WpThemeJsonWebfontsHandler extends WP_UnitTestCase {
|
||||
</style>
|
||||
EOF;
|
||||
$expected = str_replace( 'THEME_ROOT_URL', get_stylesheet_directory_uri(), $expected );
|
||||
$expected = str_replace( "\r\n", "\n", $expected );
|
||||
|
||||
$this->assertStringContainsString(
|
||||
$expected,
|
||||
|
Loading…
x
Reference in New Issue
Block a user