makeCloudRequest('GET', self::UNREACHABLE, null, null); $this->fail('The request answered rather than failing.'); } catch (CloudRequestException $exception) { $this->assertStringContainsString( self::UNREACHABLE, $exception->getMessage() ); $this->assertStringContainsString( 'could not be made', $exception->getMessage() ); } } public function testTheFailureIsNotReportedAsAnEmptyResponse() { $client = new HttpClient(); try { $client->makeCloudRequest('POST', self::UNREACHABLE, 'a=1', null); $this->fail('The request answered rather than failing.'); } catch (CloudRequestException $exception) { $this->assertStringNotContainsString( 'No data in response', $exception->getMessage() ); } } }