yii_test 928 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. * Yii console bootstrap file.
  5. */
  6. defined('YII_DEBUG') or define('YII_DEBUG', true);
  7. defined('YII_ENV') or define('YII_ENV', 'test');
  8. require __DIR__ . '/vendor/autoload.php';
  9. require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
  10. require __DIR__ . '/common/config/bootstrap.php';
  11. require __DIR__ . '/console/config/bootstrap.php';
  12. $config = yii\helpers\ArrayHelper::merge(
  13. require __DIR__ . '/common/config/main.php',
  14. require __DIR__ . '/common/config/main-local.php',
  15. require __DIR__ . '/common/config/test.php',
  16. require __DIR__ . '/common/config/test-local.php',
  17. require __DIR__ . '/console/config/main.php',
  18. require __DIR__ . '/console/config/main-local.php',
  19. require __DIR__ . '/console/config/test.php',
  20. require __DIR__ . '/console/config/test-local.php'
  21. );
  22. $application = new yii\console\Application($config);
  23. $exitCode = $application->run();
  24. exit($exitCode);