forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
32 lines (26 loc) · 914 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
// ensure we get report on all possible php errors
error_reporting(-1);
define('YII_ENABLE_ERROR_HANDLER', false);
define('YII_DEBUG', true);
define('YII_ENV', 'test');
$_SERVER['SCRIPT_NAME'] = '/' . __DIR__;
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
// require composer autoloader if available
$composerAutoload = __DIR__ . '/../vendor/autoload.php';
if (is_file($composerAutoload)) {
require_once $composerAutoload;
}
require_once __DIR__ . '/../framework/Yii.php';
Yii::setAlias('@yiiunit', __DIR__);
if (getenv('TEST_RUNTIME_PATH')) {
Yii::setAlias('@yiiunit/runtime', getenv('TEST_RUNTIME_PATH'));
Yii::setAlias('@runtime', getenv('TEST_RUNTIME_PATH'));
}
require_once __DIR__ . '/compatibility.php';
require_once __DIR__ . '/TestCase.php';