Tests: Resolve some line endings issues in blocks/renderCommentTemplate.php on Windows machines.

This change resolves a unit test failure in `Tests_Blocks_RenderReusableCommentTemplate::test_rendering_comment_template_nested()` on systems using `\r\n` line endings.

Props SergeyBiryukov.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@55153 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David Baumwald 2023-01-27 20:49:15 +00:00
parent b6f9fff7c3
commit ece2e850ca

View File

@ -333,7 +333,7 @@ class Tests_Blocks_RenderReusableCommentTemplate extends WP_UnitTestCase {
$top_level_ids = self::$comment_ids;
$expected = str_replace(
array( "\n", "\t" ),
array( "\r\n", "\n", "\t" ),
'',
<<<END
<ol class="wp-block-comment-template">
@ -387,7 +387,7 @@ END
$this->assertSame(
$expected,
str_replace( array( "\n", "\t" ), '', $block->render() )
str_replace( array( "\r\n", "\n", "\t" ), '', $block->render() )
);
}