public function MethodProphecy::willThrow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php \Prophecy\Prophecy\MethodProphecy::willThrow()
Sets throw promise to the prophecy.
Parameters
string|\Exception $exception Exception class or instance:
Return value
$this
See also
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ MethodProphecy.php, line 191
Class
- MethodProphecy
- Method prophecy.
Namespace
Prophecy\ProphecyCode
public function willThrow($exception) {
return $this
->will(new Promise\ThrowPromise($exception));
}