public function PHPUnit_Framework_MockObject_Builder_InvocationMocker::willReturnCallback in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php \PHPUnit_Framework_MockObject_Builder_InvocationMocker::willReturnCallback()
Parameters
callable $callback:
Return value
PHPUnit_Framework_MockObject_Builder_InvocationMocker
File
- vendor/
phpunit/ phpunit-mock-objects/ src/ Framework/ MockObject/ Builder/ InvocationMocker.php, line 120
Class
- PHPUnit_Framework_MockObject_Builder_InvocationMocker
- Builder for mocked or stubbed invocations.
Code
public function willReturnCallback($callback) {
$stub = new PHPUnit_Framework_MockObject_Stub_ReturnCallback($callback);
return $this
->will($stub);
}