console.php 762 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
  3. $params = require(__DIR__ . '/params.php');
  4. $db = require(__DIR__ . '/db.php');
  5. return [
  6. 'id' => 'basic-console',
  7. 'basePath' => dirname(__DIR__),
  8. 'preload' => ['log'],
  9. 'controllerPath' => dirname(__DIR__) . '/commands',
  10. 'controllerNamespace' => 'app\commands',
  11. 'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
  12. 'components' => [
  13. 'cache' => [
  14. 'class' => 'yii\caching\FileCache',
  15. ],
  16. 'log' => [
  17. 'targets' => [
  18. [
  19. 'class' => 'yii\log\FileTarget',
  20. 'levels' => ['error', 'warning'],
  21. ],
  22. ],
  23. ],
  24. 'db' => $db,
  25. 'fixture' => [
  26. 'class' => 'yii\test\DbFixtureManager',
  27. 'basePath' => '@tests/unit/fixtures',
  28. ],
  29. ],
  30. 'params' => $params,
  31. ];