ScriptFUSIONTest\Functional\Porter\Net\Http\HttpConnectorTest::testErrorResponse PHP Method

testErrorResponse() public method

public testErrorResponse ( )
    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.');
    }