You are here

public function ClientTest::testNullResponseException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testNullResponseException()

File

vendor/fabpot/goutte/Goutte/Tests/ClientTest.php, line 340

Class

ClientTest
Goutte Client Test.

Namespace

Goutte\Tests

Code

public function testNullResponseException() {
  $this
    ->setExpectedException('GuzzleHttp\\Exception\\RequestException');
  $guzzle = $this
    ->getGuzzle([
    new RequestException('', $this
      ->getMock('Psr\\Http\\Message\\RequestInterface')),
  ]);
  $client = new Client();
  $client
    ->setClient($guzzle);
  $client
    ->request('GET', 'http://www.example.com/');
  $client
    ->getResponse();
}