_bootstrap.php 660 B

123456789101112131415161718
  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', '/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. // set correct script paths
  11. $_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
  12. $_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;