WordPress.org

Make WordPress Core

Changeset 49691


Ignore:
Timestamp:
11/24/2020 08:41:13 PM (13 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesListTable.php

    r49603 r49691  
    376376        $output = ob_get_clean();
    377377
    378         $this->assertContains(
    379             <<<'OPTIONS'
     378        $expected = <<<'OPTIONS'
    380379<option value="delete">Delete</option>
    381380    <optgroup label="Change State">
     
    383382        <option value="sale">On Sale</option>
    384383    </optgroup>
    385 OPTIONS
    386             ,
    387             $output
    388         );
     384OPTIONS;
     385        $expected = str_replace( "\r\n", "\n", $expected );
     386
     387        $this->assertContains( $expected, $output );
    389388    }
    390389
Note: See TracChangeset for help on using the changeset viewer.