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].

Reviewed by desrosj, SergeyBiryukov.
Merges [49691] to the 5.6 branch.
Fixes #19278.

git-svn-id: https://develop.svn.wordpress.org/branches/5.6@49730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-12-01 19:40:50 +00:00
parent 45b2c8d0ff
commit bafdd2072d

View File

@ -375,17 +375,16 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase {
$table->bulk_actions();
$output = ob_get_clean();
$this->assertContains(
<<<'OPTIONS'
$expected = <<<'OPTIONS'
<option value="delete">Delete</option>
<optgroup label="Change State">
<option value="feature">Featured</option>
<option value="sale">On Sale</option>
</optgroup>
OPTIONS
,
$output
);
OPTIONS;
$expected = str_replace( "\r\n", "\n", $expected );
$this->assertContains( $expected, $output );
}
/**