spec\Prophecy\Prophecy\MethodProphecySpec::it_records_checked_predictions PHP Method

it_records_checked_predictions() public method

public it_records_checked_predictions ( $objectProphecy, Prophecy\Argument\ArgumentsWildcard $arguments, Prophecy\Prediction\PredictionInterface $prediction1, Prophecy\Prediction\PredictionInterface $prediction2, Prophecy\Call\Call $call1, Prophecy\Call\Call $call2, Prophecy\Promise\PromiseInterface $promise )
$arguments Prophecy\Argument\ArgumentsWildcard
$prediction1 Prophecy\Prediction\PredictionInterface
$prediction2 Prophecy\Prediction\PredictionInterface
$call1 Prophecy\Call\Call
$call2 Prophecy\Call\Call
$promise Prophecy\Promise\PromiseInterface
    function it_records_checked_predictions($objectProphecy, ArgumentsWildcard $arguments, PredictionInterface $prediction1, PredictionInterface $prediction2, Call $call1, Call $call2, PromiseInterface $promise)
    {
        $objectProphecy->addMethodProphecy($this)->willReturn(null);
        $prediction1->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn();
        $prediction2->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn();
        $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
        $this->will($promise);
        $this->withArguments($arguments);
        $this->callOnWrappedObject('shouldHave', array($prediction1));
        $this->callOnWrappedObject('shouldHave', array($prediction2));
        $this->getCheckedPredictions()->shouldReturn(array($prediction1, $prediction2));
    }
MethodProphecySpec