Skip to content

Commit

Permalink
Add different header notations to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
malteschlueter committed Feb 18, 2021
1 parent 22c2f1a commit bf03d68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ public function validContentTypes()
['HEAD', 'http://example.com/jsonrpc', [], [], ['CONTENT_TYPE' => 'application/json'], '["content"]'],
['HEAD', 'http://example.com/jsonrpc', ['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()
Expand Down

0 comments on commit bf03d68

Please sign in to comment.