From 0bd424f428e56c71e2b9179a514430ef6ba76cac Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 1 Mar 2023 15:56:39 +0000 Subject: [PATCH] Tests: Ignore EOL differences in a `wpautop()` test for `` block elements. Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result. This commit resolves a failure when running the test suite on Windows: {{{ 1) Tests_Formatting_wpAutop::test_skip_block_math_elements Failed asserting that two strings are identical. ... #Warning: Strings contain different line endings! }}} Follow-up to [55272]. Props davidbaumwald, ignatggeorgiev, sakibmd. Fixes #57718. git-svn-id: https://develop.svn.wordpress.org/trunk@55445 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/formatting/wpAutop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/formatting/wpAutop.php b/tests/phpunit/tests/formatting/wpAutop.php index b9592155fe..6630782963 100644 --- a/tests/phpunit/tests/formatting/wpAutop.php +++ b/tests/phpunit/tests/formatting/wpAutop.php @@ -158,7 +158,7 @@ PS. Not yet subscribed for update notifications? $str

", trim( wpautop( $str ) ) ); + $this->assertSameIgnoreEOL( "

$str

", trim( wpautop( $str ) ) ); } /**