You are here

function CallCenterSpec::it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php \spec\Prophecy\Call\CallCenterSpec::it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise()

Parameters

\Prophecy\Prophecy\MethodProphecy $method:

\Prophecy\Argument\ArgumentsWildcard $arguments:

File

vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php, line 157

Class

CallCenterSpec

Namespace

spec\Prophecy\Call

Code

function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise($objectProphecy, $method, $arguments) {
  $method
    ->getMethodName()
    ->willReturn('getName');
  $method
    ->getArgumentsWildcard()
    ->willReturn($arguments);
  $method
    ->getPromise()
    ->willReturn(null);
  $arguments
    ->scoreArguments(array(
    'world',
    'everything',
  ))
    ->willReturn(100);
  $objectProphecy
    ->getMethodProphecies()
    ->willReturn(array(
    $method,
  ));
  $objectProphecy
    ->getMethodProphecies('getName')
    ->willReturn(array(
    $method,
  ));
  $this
    ->makeCall($objectProphecy, 'getName', array(
    'world',
    'everything',
  ))
    ->shouldReturn(null);
}