skip exiting in test env.

see 0cfd41a21a (commitcomment-5238567)
issue #2233
This commit is contained in:
Carsten Brandt
2014-02-01 19:53:01 +01:00
parent 7e807206cc
commit 214f66a8c1
2 changed files with 5 additions and 2 deletions

View File

@ -87,7 +87,10 @@ class ErrorHandler extends Component
{
if (Yii::$app instanceof \yii\console\Application || YII_ENV_TEST) {
echo Yii::$app->renderException($exception);
exit(1);
if (!YII_ENV_TEST) {
exit(1);
}
return;
}
$useErrorView = !YII_DEBUG || $exception instanceof UserException;