more scrutinizer-ci
This commit is contained in:
@@ -34,7 +34,8 @@ class Response
|
|||||||
* thanks to ricardovermeltfoort@gmail.com
|
* thanks to ricardovermeltfoort@gmail.com
|
||||||
* http://php.net/manual/en/function.http-parse-headers.php#112986
|
* 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')) {
|
if (function_exists('http_parse_headers')) {
|
||||||
return http_parse_headers($raw_headers);
|
return http_parse_headers($raw_headers);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ class UnirestTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testBasicAuthentication()
|
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;
|
$headers = $response->body->headers;
|
||||||
$this->assertEquals('Basic dXNlcjpwYXNzd29yZA==', $headers->Authorization);
|
$this->assertEquals('Basic dXNlcjpwYXNzd29yZA==', $headers->Authorization);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user