function CallCenterSpec::it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php \spec\Prophecy\Call\CallCenterSpec::it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies()
Parameters
\Prophecy\Prophecy\MethodProphecy $method:
\Prophecy\Argument\ArgumentsWildcard $arguments:
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Call/ CallCenterSpec.php, line 137
Class
Namespace
spec\Prophecy\CallCode
function it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies($objectProphecy, $method, $arguments) {
$method
->getMethodName()
->willReturn('getName');
$method
->getArgumentsWildcard()
->willReturn($arguments);
$arguments
->scoreArguments(array(
'world',
'everything',
))
->willReturn(false);
$arguments
->__toString()
->willReturn('arg1, arg2');
$objectProphecy
->getMethodProphecies()
->willReturn(array(
'method1' => array(
$method,
),
));
$objectProphecy
->getMethodProphecies('getName')
->willReturn(array(
$method,
));
$this
->shouldThrow('Prophecy\\Exception\\Call\\UnexpectedCallException')
->duringMakeCall($objectProphecy, 'getName', array(
'world',
'everything',
));
}