public function PHPUnit_Framework_MockObject_Builder_InvocationMocker::willThrowException 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::willThrowException()
Parameters
Exception $exception:
Return value
PHPUnit_Framework_MockObject_Builder_InvocationMocker
File
- vendor/
phpunit/ phpunit-mock-objects/ src/ Framework/ MockObject/ Builder/ InvocationMocker.php, line 156
Class
- PHPUnit_Framework_MockObject_Builder_InvocationMocker
- Builder for mocked or stubbed invocations.
Code
public function willThrowException(Exception $exception) {
$stub = new PHPUnit_Framework_MockObject_Stub_Exception($exception);
return $this
->will($stub);
}