spec\Prophecy\Call\CallCenterSpec::it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard PHP 메소드

it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard() 공개 메소드

public it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard ( $objectProphecy, Prophecy\Argument\ArgumentsWildcard $wildcard )
$wildcard Prophecy\Argument\ArgumentsWildcard
    function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard($objectProphecy, ArgumentsWildcard $wildcard)
    {
        $objectProphecy->getMethodProphecies()->willReturn(array());
        $this->makeCall($objectProphecy, 'getName', array('world'));
        $this->makeCall($objectProphecy, 'getName', array('everything'));
        $this->makeCall($objectProphecy, 'setName', array(42));
        $wildcard->scoreArguments(array('world'))->willReturn(false);
        $wildcard->scoreArguments(array('everything'))->willReturn(10);
        $calls = $this->findCalls('getName', $wildcard);
        $calls->shouldHaveCount(1);
        $calls[0]->getMethodName()->shouldReturn('getName');
        $calls[0]->getArguments()->shouldReturn(array('everything'));
    }