Add different header notations to tests

This commit is contained in:
Malte Schlüter 2021-02-18 11:52:56 +01:00
parent 9765b5ab86
commit 251ce8f924
1 changed files with 12 additions and 0 deletions

View File

@ -63,6 +63,18 @@ class HttpBrowserTest extends AbstractBrowserTest
['POST', 'http://example.com/', [], [], ['CONTENT_TYPE' => 'application/json'], '["content"]'],
['POST', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
];
yield 'custom header with HTTP_ prefix' => [
['PUT', 'http://example.com/', [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '["content"]'],
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
];
yield 'modify notation of custom header with HTTP_ prefix' => [
['PUT', 'http://example.com/', [], [], ['HTTP_Content-Type' => 'application/json'], '["content"]'],
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
];
yield 'modify notation of custom header' => [
['PUT', 'http://example.com/', [], [], ['Content-Type' => 'application/json'], '["content"]'],
['PUT', 'http://example.com/', ['headers' => $defaultHeaders + ['content-type' => 'application/json'], 'body' => '["content"]', 'max_redirects' => 0]],
];
}
public function testMultiPartRequestWithSingleFile()