Make WordPress Core

Changeset 58012


Ignore:
Timestamp:
04/16/2024 11:07:32 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Tests: Revert the case change for expected headers in HTTP tests for the 4.5 branch.

Prior to [37428], the headers returned by wp_remote_retrieve_headers() were case-sensitive.

Follow-up to [37428], [38730], [58008].

See #60865.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5/tests/phpunit/tests/http/functions.php

    r58008 r58012  
    2828
    2929        $this->assertInternalType( 'array', $headers, "Reply wasn't array." );
    30         $this->assertSame( 'image/png', $headers['Content-Type'] );
    31         $this->assertSame( '153204', $headers['Content-Length'] );
     30        $this->assertSame( 'image/png', $headers['content-type'] );
     31        $this->assertSame( '153204', $headers['content-length'] );
    3232        $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );
    3333    }
     
    7373        // Should return the same headers as a HEAD request.
    7474        $this->assertInternalType( 'array', $headers, "Reply wasn't array." );
    75         $this->assertSame( 'image/png', $headers['Content-Type'] );
    76         $this->assertSame( '153204', $headers['Content-Length'] );
     75        $this->assertSame( 'image/png', $headers['content-type'] );
     76        $this->assertSame( '153204', $headers['content-length'] );
    7777        $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );
    7878    }
     
    9595        // Should return the same headers as a HEAD request.
    9696        $this->assertInternalType( 'array', $headers, "Reply wasn't array." );
    97         $this->assertSame( 'image/png', $headers['Content-Type'] );
    98         $this->assertSame( '153204', $headers['Content-Length'] );
     97        $this->assertSame( 'image/png', $headers['content-type'] );
     98        $this->assertSame( '153204', $headers['content-length'] );
    9999        $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );
    100100    }
Note: See TracChangeset for help on using the changeset viewer.