_bootstrap.php 805 B

1234567891011121314151617181920212223
  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', '/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(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.php');
  11. // set correct script paths
  12. $_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
  13. $_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
  14. $_SERVER['SERVER_NAME'] = 'localhost';
  15. Yii::setAlias('@codeception', __DIR__);