_bootstrap.php 794 Bytes
Newer Older
Mark committed
1
<?php
2

3 4
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
5
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/basic/web/index-test.php');
6 7

// the entry script file path for functional and acceptance tests
8
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
9

10
defined('YII_DEBUG') or define('YII_DEBUG', true);
11

12
defined('YII_ENV') or define('YII_ENV', 'test');
13 14

require_once(__DIR__ . '/../vendor/autoload.php');
15

Qiang Xue committed
16
require_once(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
17

18 19 20
// set correct script paths
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
21
$_SERVER['SERVER_NAME'] = 'localhost';
22

23
Yii::setAlias('@tests', __DIR__);