spec\Prophecy\Prophecy\MethodProphecySpec::it_checks_prediction_via_shouldHave_method_call_with_callback PHP Method

it_checks_prediction_via_shouldHave_method_call_with_callback() public method

public it_checks_prediction_via_shouldHave_method_call_with_callback ( $objectProphecy, Prophecy\Argument\ArgumentsWildcard $arguments, Prophecy\Call\Call $call1, Prophecy\Call\Call $call2 )
$arguments Prophecy\Argument\ArgumentsWildcard
$call1 Prophecy\Call\Call
$call2 Prophecy\Call\Call
    function it_checks_prediction_via_shouldHave_method_call_with_callback($objectProphecy, ArgumentsWildcard $arguments, Call $call1, Call $call2)
    {
        $callback = function ($calls, $object, $method) {
            throw new \RuntimeException();
        };
        $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2));
        $this->withArguments($arguments);
        $this->shouldThrow('RuntimeException')->duringShouldHave($callback);
    }
MethodProphecySpec