Skip to content

Commit bc654a8

Browse files
committed
fixes namespace and adds test
1 parent e232a4b commit bc654a8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Google/Http/REST.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
use Google\Auth\HttpHandler\HttpHandlerFactory;
1919
use GuzzleHttp\ClientInterface;
2020
use GuzzleHttp\Exception\RequestException;
21+
use GuzzleHttp\Psr7\Response;
2122
use Psr\Http\Message\RequestInterface;
2223
use Psr\Http\Message\ResponseInterface;
23-
use Psr\Http\Message\Response;
2424

2525
/**
2626
* This class implements the RESTful transport of apiServiceRequest()'s

tests/Google/Http/RESTTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ public function testDecode500ResponseThrowsException()
7070
$this->rest->decodeHttpResponse($response, $this->request);
7171
}
7272

73+
/** @expectedException Google_Service_Exception */
74+
public function testExceptionResponse()
75+
{
76+
$http = new GuzzleHttp\Client();
77+
78+
$request = new Request('GET', 'http://httpbin.org/status/500');
79+
$response = $this->rest->doExecute($http, $request);
80+
}
7381

7482
public function testDecodeEmptyResponse()
7583
{

0 commit comments

Comments
 (0)