|
@@ 170-176 (lines=7) @@
|
| 167 |
|
$this->assertEquals('', $r->getHeaderLine('Bar')); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
public function testHostIsNotOverwrittenWhenPreservingHost() |
| 171 |
|
{ |
| 172 |
|
$r = new Request('GET', 'http://foo.com/baz?bar=bam', ['Host' => 'a.com']); |
| 173 |
|
$this->assertEquals(['Host' => ['a.com']], $r->getHeaders()); |
| 174 |
|
$r2 = $r->withUri(new Uri('http://www.foo.com/bar'), true); |
| 175 |
|
$this->assertEquals('a.com', $r2->getHeaderLine('Host')); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function testOverridesHostWithUri() |
| 179 |
|
{ |
|
@@ 178-184 (lines=7) @@
|
| 175 |
|
$this->assertEquals('a.com', $r2->getHeaderLine('Host')); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function testOverridesHostWithUri() |
| 179 |
|
{ |
| 180 |
|
$r = new Request('GET', 'http://foo.com/baz?bar=bam'); |
| 181 |
|
$this->assertEquals(['Host' => ['foo.com']], $r->getHeaders()); |
| 182 |
|
$r2 = $r->withUri(new Uri('http://www.baz.com/bar')); |
| 183 |
|
$this->assertEquals('www.baz.com', $r2->getHeaderLine('Host')); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
public function testAggregatesHeaders() |
| 187 |
|
{ |