You are here

function ObjectProphecySpec::its_addMethodProphecy_adds_method_prophecy in Zircon Profile 8

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

Parameters

\Prophecy\Prophecy\MethodProphecy $methodProphecy:

\Prophecy\Argument\ArgumentsWildcard $argumentsWildcard:

File

vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php, line 128

Class

ObjectProphecySpec

Namespace

spec\Prophecy\Prophecy

Code

function its_addMethodProphecy_adds_method_prophecy($methodProphecy, $argumentsWildcard) {
  $methodProphecy
    ->getArgumentsWildcard()
    ->willReturn($argumentsWildcard);
  $methodProphecy
    ->getMethodName()
    ->willReturn('getUsername');
  $this
    ->addMethodProphecy($methodProphecy);
  $this
    ->getMethodProphecies()
    ->shouldReturn(array(
    'getUsername' => array(
      $methodProphecy,
    ),
  ));
}