You are here

function CallbackPredictionSpec::it_proxies_call_to_callback in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php \spec\Prophecy\Prediction\CallbackPredictionSpec::it_proxies_call_to_callback()

Parameters

\Prophecy\Prophecy\ObjectProphecy $object:

\Prophecy\Prophecy\MethodProphecy $method:

\Prophecy\Call\Call $call:

File

vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php, line 26

Class

CallbackPredictionSpec

Namespace

spec\Prophecy\Prediction

Code

function it_proxies_call_to_callback($object, $method, $call) {
  $returnFirstCallCallback = function ($calls, $object, $method) {
    throw new RuntimeException();
  };
  $this
    ->beConstructedWith($returnFirstCallCallback);
  $this
    ->shouldThrow('RuntimeException')
    ->duringCheck(array(
    $call,
  ), $object, $method);
}