_bootstrap.php 650 Bytes
Newer Older
Mark committed
1
<?php
2 3
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
4

5 6
defined('YII_TEST_ENTRY_URL') or define('YII_TEST_ENTRY_URL', \Codeception\Configuration::config()['config']['test_entry_url']);
defined('YII_TEST_ENTRY_FILE') or define('YII_TEST_ENTRY_FILE', dirname(dirname(__DIR__)) . '/web/index-test.php');
7

8
require_once(__DIR__ . '/../../vendor/autoload.php');
9
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
10

11 12
$_SERVER['SCRIPT_FILENAME'] = YII_TEST_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = YII_TEST_ENTRY_URL;
13
$_SERVER['SERVER_NAME'] = 'localhost';
14

15
Yii::setAlias('@tests', dirname(__DIR__));