17 lines
615B

  1. <?php
  2. defined('YII_DEBUG') or define('YII_DEBUG', true);
  3. defined('YII_ENV') or define('YII_ENV', 'test');
  4. defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
  5. require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
  6. require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
  7. require_once(YII_APP_BASE_PATH . '/common/config/bootstrap.php');
  8. require_once(YII_APP_BASE_PATH . '/console/config/bootstrap.php');
  9. // set correct script paths
  10. $_SERVER['SERVER_NAME'] = 'localhost';
  11. $_SERVER['SERVER_PORT'] = '80';
  12. Yii::setAlias('@tests', dirname(dirname(__DIR__)));