_bootstrap.php 807 Bytes
Newer Older
Mark committed
1 2 3 4
<?php

// 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', '/index-test.php');
Mark committed
6 7

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

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

12
defined('YII_ENV') or define('YII_ENV', 'test');
Mark committed
13 14 15 16 17 18 19 20 21 22 23

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

require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');

require(__DIR__ . '/../../common/config/aliases.php');

// set correct script paths
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
$_SERVER['SERVER_NAME'] = 'localhost';