_bootstrap.php 764 B

12345678910111213141516171819202122
  1. <?php
  2. // the entry script URL (without host info) for functional and acceptance tests
  3. // PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
  4. defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/yii2-basic/web/index-test.php');
  5. // the entry script file path for functional and acceptance tests
  6. defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
  7. defined('YII_DEBUG') or define('YII_DEBUG', true);
  8. defined('YII_ENV') or define('YII_ENV', 'test');
  9. require_once(__DIR__ . '/../vendor/autoload.php');
  10. require_once(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php');
  11. // set correct script paths
  12. $_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
  13. $_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
  14. Yii::setAlias('@tests', __DIR__);