You are here

function MethodProphecySpec::it_checks_prediction_via_shouldHave_method_call in Zircon Profile 8.0

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

Parameters

\Prophecy\Argument\ArgumentsWildcard $arguments:

\Prophecy\Prediction\PredictionInterface $prediction:

\Prophecy\Call\Call $call1:

\Prophecy\Call\Call $call2:

File

vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php, line 194

Class

MethodProphecySpec

Namespace

spec\Prophecy\Prophecy

Code

function it_checks_prediction_via_shouldHave_method_call($objectProphecy, $arguments, $prediction, $call1, $call2) {
  $objectProphecy
    ->addMethodProphecy($this)
    ->willReturn(null);
  $prediction
    ->check(array(
    $call1,
    $call2,
  ), $objectProphecy
    ->getWrappedObject(), $this)
    ->shouldBeCalled();
  $objectProphecy
    ->findProphecyMethodCalls('getName', $arguments)
    ->willReturn(array(
    $call1,
    $call2,
  ));
  $this
    ->withArguments($arguments);
  $this
    ->callOnWrappedObject('shouldHave', array(
    $prediction,
  ));
}