You are here

class CallbackPredictionSpec in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php \spec\Prophecy\Prediction\CallbackPredictionSpec

Hierarchy

Expanded class hierarchy of CallbackPredictionSpec

File

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

Namespace

spec\Prophecy\Prediction
View source
class CallbackPredictionSpec extends ObjectBehavior {
  function let() {
    $this
      ->beConstructedWith('get_class');
  }
  function it_is_prediction() {
    $this
      ->shouldHaveType('Prophecy\\Prediction\\PredictionInterface');
  }

  /**
   * @param \Prophecy\Prophecy\ObjectProphecy $object
   * @param \Prophecy\Prophecy\MethodProphecy $method
   * @param \Prophecy\Call\Call               $call
   */
  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);
  }

}

Members