Make WordPress Core

Changeset 49730


Ignore:
Timestamp:
12/01/2020 07:40:50 PM (4 years 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].

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

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

  • branches/5.6/tests/phpunit/tests/admin/includesListTable.php

    r49603 r49730  
    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.