From c869ef617e03677279ff64b68630da823275988e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 24 Nov 2020 20:41:13 +0000 Subject: [PATCH] Tests: Ignore EOL differences in `WP_List_Table::get_bulk_items()` test for optgroups. This avoids a misleading failure due to Unix vs. Windows EOL style mismatches and allows the test to pass on Windows. Follow-up to [46612], [49190]. See #19278. git-svn-id: https://develop.svn.wordpress.org/trunk@49691 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/includesListTable.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/tests/admin/includesListTable.php b/tests/phpunit/tests/admin/includesListTable.php index d19c2c0e63..eaa496021c 100644 --- a/tests/phpunit/tests/admin/includesListTable.php +++ b/tests/phpunit/tests/admin/includesListTable.php @@ -375,17 +375,16 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase { $table->bulk_actions(); $output = ob_get_clean(); - $this->assertContains( - <<<'OPTIONS' + $expected = <<<'OPTIONS' -OPTIONS - , - $output - ); +OPTIONS; + $expected = str_replace( "\r\n", "\n", $expected ); + + $this->assertContains( $expected, $output ); } /**