PhpParser\Parser\MultipleTest::testThrownError PHP Метод

testThrownError() публичный Метод

public testThrownError ( )
    public function testThrownError()
    {
        $this->setExpectedException('PhpParser\\Error', 'FAIL A');
        $parserA = $this->getMockBuilder('PhpParser\\Parser')->getMock();
        $parserA->expects($this->at(0))->method('parse')->will($this->throwException(new Error('FAIL A')));
        $parserB = $this->getMockBuilder('PhpParser\\Parser')->getMock();
        $parserB->expects($this->at(0))->method('parse')->will($this->throwException(new Error('FAIL B')));
        $parser = new Multiple([$parserA, $parserB]);
        $parser->parse('dummy');
    }