Update composer dependencies

This commit is contained in:
Kijin Sung 2017-06-29 23:39:23 +09:00
parent 49cc39e507
commit cbd324c35b
428 changed files with 17862 additions and 5885 deletions

26
vendor/rmccue/requests/tests/Requests.php vendored Executable file → Normal file
View file

@ -9,7 +9,7 @@ class RequestsTest_Requests extends PHPUnit_Framework_TestCase {
}
public function testDefaultTransport() {
$request = Requests::get('http://httpbin.org/get');
$request = Requests::get(httpbin('/get'));
$this->assertEquals(200, $request->status_code);
}
@ -51,6 +51,20 @@ class RequestsTest_Requests extends PHPUnit_Framework_TestCase {
}
}
public function testProtocolVersionParsing() {
$transport = new RawTransport();
$transport->data =
"HTTP/1.0 200 OK\r\n".
"Host: localhost\r\n\r\n";
$options = array(
'transport' => $transport
);
$response = Requests::get('http://example.com/', array(), $options);
$this->assertEquals(1.0, $response->protocol_version);
}
public function testRawAccess() {
$transport = new RawTransport();
$transport->data =
@ -137,4 +151,12 @@ class RequestsTest_Requests extends PHPUnit_Framework_TestCase {
$this->assertEquals(302, $response->status_code);
$this->assertEquals(0, $response->redirects);
}
}
/**
* @expectedException Requests_Exception
*/
public function testTimeoutException() {
$options = array('timeout' => 0.5);
$response = Requests::get(httpbin('/delay/3'), array(), $options);
}
}