Skip to content

Commit 1c4a36c

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/branches/4.5@58012 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 34b8b7b commit 1c4a36c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/phpunit/tests/http/functions.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function test_head_request() {
2727
$headers = wp_remote_retrieve_headers( $response );
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
}
3434

@@ -72,8 +72,8 @@ public function test_get_request() {
7272

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
}
7979

@@ -94,8 +94,8 @@ public function test_get_redirect() {
9494

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
}
101101

0 commit comments

Comments
 (0)