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
This commit is contained in:
Sergey Biryukov 2020-11-24 20:41:13 +00:00
parent d9976e94e2
commit c869ef617e

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 );
}
/**