Fixedissue with priority of headers

This commit is contained in:
Igor Rusinov
2016-03-20 20:53:52 +03:00
parent 2bedcf05ac
commit 28080c975c
3 changed files with 8 additions and 1 deletions

View File

@@ -48,6 +48,12 @@ class UnirestRequestTest extends \PHPUnit_Framework_TestCase
$this->assertObjectHasAttribute('header2', $response->body->headers);
$this->assertEquals('world', $response->body->headers->header2);
$response = Request::get('http://mockbin.com/request', ['header1' => 'Custom value']);
$this->assertEquals(200, $response->code);
$this->assertObjectHasAttribute('header1', $response->body->headers);
$this->assertEquals('Custom value', $response->body->headers->header1);
Request::clearDefaultHeaders();
$response = Request::get('http://mockbin.com/request');