Tests: Ignore EOL differences in a wpautop() test for <math> 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
This commit is contained in:
Sergey Biryukov
2023-03-01 15:56:39 +00:00
parent 0a91a53cf7
commit 0bd424f428

View File

@@ -158,7 +158,7 @@ PS. Not yet subscribed for update notifications? <a href="%1$s" title="Subscri
</mtable>
</math>';
$this->assertSame( "<p>$str</p>", trim( wpautop( $str ) ) );
$this->assertSameIgnoreEOL( "<p>$str</p>", trim( wpautop( $str ) ) );
}
/**