public function testErrorResponse()
{
$server = $this->startServer('404');
try {
$this->fetch();
} catch (FailingTooHardException $exception) {
self::assertInstanceOf(HttpServerException::class, $exception->getPrevious(), $exception->getMessage());
self::assertStringEndsWith('foo', $exception->getPrevious()->getMessage());
return;
} finally {
$this->stopServer($server);
}
self::fail('Expected exception was not thrown.');
}