Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Test if header returns last added value
Browse files Browse the repository at this point in the history
  • Loading branch information
thestanislav authored and weierophinney committed Apr 26, 2018
1 parent 9326e53 commit 0261976
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/HeadersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ public function testHeadersHasAndGetWorkProperly()
$this->assertSame($f, $headers->get('foo'));
}

public function testHeadersGetReturnsLastAddedHeaderValue()
{
$headers = new Headers();
$headers->addHeaders([
new Header\GenericHeader('Foo', 'bar'),
]);
$headers->addHeader(new Header\GenericHeader('Foo', $value = 'baz'));

$this->assertEquals($value, $headers->get('foo')->getFieldValue());
}

public function testHeadersAggregatesHeaderObjects()
{
$fakeHeader = new Header\GenericHeader('Fake', 'bar');
Expand Down

0 comments on commit 0261976

Please sign in to comment.