portal.mkgtu.ru/console/yii_test

27 lines
790 B
PHP
Executable File

#!/usr/bin/env php
<?php
/**
* Yii console bootstrap file.
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../common/env.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../common/config/bootstrap.php');
require(__DIR__ . '/config/bootstrap.php');
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../common/config/base.php'),
require(__DIR__ . '/../common/config/console.php'),
require(__DIR__ . '/../common/config/test.php'),
require(__DIR__ . '/config/console.php'),
require(__DIR__ . '/config/test.php'),
);
$app = new yii\console\Application($config);
$exitCode = $app->run();
exit($exitCode);