WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/09/2021 07:41:47 PM (7 months ago)
Author:
SergeyBiryukov
Message:

Tests: Ignore EOL differences in some tests using multiline string assertions.

Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (<<<) or multiline strings as the expected result.

Follow-up to [48466], [50995], [51079].

See #52625.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-widget-types-controller.php

    r51079 r51135  
    308308        $response = rest_get_server()->dispatch( $request );
    309309        $data     = $response->get_data();
    310         $this->assertSame(
     310        $this->assertSameIgnoreEOL(
    311311            "<p>\n" .
    312312            "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
     
    344344        $response = rest_get_server()->dispatch( $request );
    345345        $data     = $response->get_data();
    346         $this->assertSame(
     346        $this->assertSameIgnoreEOL(
    347347            "<p>\n" .
    348348            "\t\t\t<label for=\"widget-search-8-title\">Title:</label>\n" .
     
    386386        $response = rest_get_server()->dispatch( $request );
    387387        $data     = $response->get_data();
    388         $this->assertSame(
     388        $this->assertSameIgnoreEOL(
    389389            "<p>\n" .
    390390            "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
     
    422422        $response = rest_get_server()->dispatch( $request );
    423423        $data     = $response->get_data();
    424         $this->assertSame(
     424        $this->assertSameIgnoreEOL(
    425425            "<p>\n" .
    426426            "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
     
    466466        $response = rest_get_server()->dispatch( $request );
    467467        $data     = $response->get_data();
    468         $this->assertSame(
     468        $this->assertSameIgnoreEOL(
    469469            "<p>\n" .
    470470            "\t\t\t<label for=\"widget-search--1-title\">Title:</label>\n" .
Note: See TracChangeset for help on using the changeset viewer.