Skip to content

Commit cfa8d92

Browse files
Add different header notations to tests
1 parent 17c8f6e commit cfa8d92

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/HttpBrowserTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ public function validContentTypes()
6363
['POST', 'http://example.com/', [], [], ['CONTENT_TYPE' => 'application/json'], '["content"]'],
6464
['POST', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
6565
];
66+
yield 'custom header with HTTP_ prefix' => [
67+
['PUT', 'http://example.com/', [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '["content"]'],
68+
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
69+
];
70+
yield 'modify notation of custom header with HTTP_ prefix' => [
71+
['PUT', 'http://example.com/', [], [], ['HTTP_Content-Type' => 'application/json'], '["content"]'],
72+
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
73+
];
74+
yield 'modify notation of custom header' => [
75+
['PUT', 'http://example.com/', [], [], ['Content-Type' => 'application/json'], '["content"]'],
76+
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
77+
];
6678
}
6779

6880
public function testMultiPartRequestWithSingleFile()

0 commit comments

Comments
 (0)