spec\Prophecy\ProphetSpec::it_throws_AggregateException_if_defined_predictions_fail PHP Метод

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

public it_throws_AggregateException_if_defined_predictions_fail ( Prophecy\Prophecy\MethodProphecy $method1, Prophecy\Prophecy\MethodProphecy $method2, Prophecy\Argument\ArgumentsWildcard $arguments1, Prophecy\Argument\ArgumentsWildcard $arguments2 )
$method1 Prophecy\Prophecy\MethodProphecy
$method2 Prophecy\Prophecy\MethodProphecy
$arguments1 Prophecy\Argument\ArgumentsWildcard
$arguments2 Prophecy\Argument\ArgumentsWildcard
    function it_throws_AggregateException_if_defined_predictions_fail(MethodProphecy $method1, MethodProphecy $method2, ArgumentsWildcard $arguments1, ArgumentsWildcard $arguments2)
    {
        $method1->getMethodName()->willReturn('getName');
        $method1->getArgumentsWildcard()->willReturn($arguments1);
        $method1->checkPrediction()->willReturn(null);
        $method2->getMethodName()->willReturn('isSet');
        $method2->getArgumentsWildcard()->willReturn($arguments2);
        $method2->checkPrediction()->willThrow('Prophecy\\Exception\\Prediction\\AggregateException');
        $this->prophesize()->addMethodProphecy($method1);
        $this->prophesize()->addMethodProphecy($method2);
        $this->shouldThrow('Prophecy\\Exception\\Prediction\\AggregateException')->duringCheckPredictions();
    }