diff --git a/src/Unirest/Response.php b/src/Unirest/Response.php index b99cf89..c77477c 100644 --- a/src/Unirest/Response.php +++ b/src/Unirest/Response.php @@ -34,7 +34,8 @@ class Response * thanks to ricardovermeltfoort@gmail.com * http://php.net/manual/en/function.http-parse-headers.php#112986 */ - private function parseHeaders($raw_headers) { + private function parseHeaders($raw_headers) + { if (function_exists('http_parse_headers')) { return http_parse_headers($raw_headers); } else { diff --git a/tests/Unirest/RequestTest.php b/tests/Unirest/RequestTest.php index 9c52f26..bb68c4a 100644 --- a/tests/Unirest/RequestTest.php +++ b/tests/Unirest/RequestTest.php @@ -353,7 +353,7 @@ class UnirestTest extends \PHPUnit_Framework_TestCase public function testBasicAuthentication() { - $response = Request::get('http://httpbin.org/get', null, array(), 'user', 'password'); + $response = Request::get('http://httpbin.org/get', array(), array(), 'user', 'password'); $headers = $response->body->headers; $this->assertEquals('Basic dXNlcjpwYXNzd29yZA==', $headers->Authorization); }