spec\Prophecy\Call\CallCenterSpec::it_records_calls_made_through_makeCall_method PHP Method

it_records_calls_made_through_makeCall_method() public method

public it_records_calls_made_through_makeCall_method ( Prophecy\Prophecy\ObjectProphecy $objectProphecy, Prophecy\Argument\ArgumentsWildcard $wildcard )
$objectProphecy Prophecy\Prophecy\ObjectProphecy
$wildcard Prophecy\Argument\ArgumentsWildcard
    function it_records_calls_made_through_makeCall_method(ObjectProphecy $objectProphecy, ArgumentsWildcard $wildcard)
    {
        $wildcard->scoreArguments(array(5, 2, 3))->willReturn(10);
        $objectProphecy->getMethodProphecies()->willReturn(array());
        $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3));
        $calls = $this->findCalls('setValues', $wildcard);
        $calls->shouldHaveCount(1);
        $calls[0]->shouldBeAnInstanceOf('Prophecy\\Call\\Call');
        $calls[0]->getMethodName()->shouldReturn('setValues');
        $calls[0]->getArguments()->shouldReturn(array(5, 2, 3));
        $calls[0]->getReturnValue()->shouldReturn(null);
    }