Kraken\_Unit\Network\Http\Driver\Reader\HttpReaderTest::testApiReadResponse_ThrowsException_WhenParserThrowsException PHP Method

testApiReadResponse_ThrowsException_WhenParserThrowsException() public method

    public function testApiReadResponse_ThrowsException_WhenParserThrowsException()
    {
        $text = 'Text';
        $buffer = new Buffer($text);
        $data = 'Data' . HttpReader::HTTP_EOM;
        $reader = $this->createReader();
        $parser = $this->createParser();
        $parser->expects($this->once())->method('parseResponse')->with($text . $data)->will($this->throwException(new Exception()));
        $this->setExpectedException(InvalidFormatException::class);
        $reader->readResponse($buffer, $data);
    }