You are here

function CallPredictionSpec::it_throws_NoCallsException_if_no_calls_found in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php \spec\Prophecy\Prediction\CallPredictionSpec::it_throws_NoCallsException_if_no_calls_found()

Parameters

\Prophecy\Prophecy\ObjectProphecy $object:

\Prophecy\Prophecy\MethodProphecy $method:

\Prophecy\Argument\ArgumentsWildcard $arguments:

File

vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php, line 30

Class

CallPredictionSpec

Namespace

spec\Prophecy\Prediction

Code

function it_throws_NoCallsException_if_no_calls_found($object, $method, $arguments) {
  $method
    ->getObjectProphecy()
    ->willReturn($object);
  $method
    ->getMethodName()
    ->willReturn('getName');
  $method
    ->getArgumentsWildcard()
    ->willReturn($arguments);
  $arguments
    ->__toString()
    ->willReturn('123');
  $object
    ->reveal()
    ->willReturn(new \stdClass());
  $object
    ->findProphecyMethodCalls('getName', Argument::any())
    ->willReturn(array());
  $this
    ->shouldThrow('Prophecy\\Exception\\Prediction\\NoCallsException')
    ->duringCheck(array(), $object, $method);
}