public function PHPUnit_Framework_MockObject_Stub_ReturnArgument::invoke in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php \PHPUnit_Framework_MockObject_Stub_ReturnArgument::invoke()
Fakes the processing of the invocation $invocation by returning a specific value.
Parameters
PHPUnit_Framework_MockObject_Invocation $invocation: The invocation which was mocked and matched by the current method and argument matchers.
Return value
mixed
Overrides PHPUnit_Framework_MockObject_Stub_Return::invoke
File
- vendor/
phpunit/ phpunit-mock-objects/ src/ Framework/ MockObject/ Stub/ ReturnArgument.php, line 25
Class
- PHPUnit_Framework_MockObject_Stub_ReturnArgument
- Stubs a method by returning an argument that was passed to the mocked method.
Code
public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) {
if (isset($invocation->parameters[$this->argumentIndex])) {
return $invocation->parameters[$this->argumentIndex];
}
else {
return;
}
}