Skip to content

Commit

Permalink
add test coverage for setHeader original case preservation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate committed May 3, 2019
1 parent 3e34a38 commit d15f864
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/HeadersTest.php
Expand Up @@ -88,6 +88,18 @@ public function testSetHeader()
$this->assertEquals(['Content-Length' => ['100']], $headers->getHeaders(true));
}

public function testSetHeaderPreservesOriginalCaseIfHeaderAlreadyExists()
{
$headers = new Headers([
'CONTENT-LENGTH' => 0,
]);

$headers->setHeader('Content-Length', 100);

$this->assertEquals(['content-length' => ['100']], $headers->getHeaders());
$this->assertEquals(['CONTENT-LENGTH' => ['100']], $headers->getHeaders(true));
}

public function testSetHeaders()
{
$headers = new Headers([
Expand Down

0 comments on commit d15f864

Please sign in to comment.