Skip to content

Commit

Permalink
Replace \yii\console\Controller::EXIT_CODE_NORMAL to ExitCode::OK.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Sep 21, 2023
1 parent 0425642 commit f7a9fa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace yiiunit\framework\console\controllers;

use Yii;
use yii\console\ExitCode;
use yii\db\Connection;

/**
Expand Down Expand Up @@ -44,7 +45,7 @@ protected static function runConsoleAction($route, $params = [])
ob_start();
$result = Yii::$app->runAction($route, $params);
echo 'Result is ' . $result;
if ($result !== \yii\console\Controller::EXIT_CODE_NORMAL) {
if ($result !== ExitCode::OK) {
ob_end_flush();
} else {
ob_end_clean();
Expand Down
3 changes: 2 additions & 1 deletion tests/framework/i18n/DbMessageSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Yii;
use yii\base\Event;
use yii\console\ExitCode;
use yii\db\Connection;
use yii\i18n\DbMessageSource;
use yii\i18n\I18N;
Expand Down Expand Up @@ -66,7 +67,7 @@ protected static function runConsoleAction($route, $params = [])
ob_start();
$result = Yii::$app->runAction($route, $params);
echo 'Result is ' . $result;
if ($result !== \yii\console\Controller::EXIT_CODE_NORMAL) {
if ($result !== ExitCode::OK) {
ob_end_flush();
} else {
ob_end_clean();
Expand Down

0 comments on commit f7a9fa5

Please sign in to comment.