bootstrap.php 606 Bytes
Newer Older
w  
Qiang Xue committed
1 2
<?php

3 4 5
// ensure we get report on all possible php errors
error_reporting(-1);

w  
Qiang Xue committed
6 7 8 9 10
define('YII_ENABLE_ERROR_HANDLER', false);
define('YII_DEBUG', true);
$_SERVER['SCRIPT_NAME'] = '/' . __DIR__;
$_SERVER['SCRIPT_FILENAME'] = __FILE__;

11 12 13
// require composer autoloader if available
$composerAutoload = __DIR__ . '/../../vendor/autoload.php';
if (is_file($composerAutoload)) {
14
    require_once($composerAutoload);
Qiang Xue committed
15 16
} else {
    require_once(__DIR__ . '/../../../../autoload.php');
17
}
Qiang Xue committed
18
require_once(__DIR__ . '/../../framework/Yii.php');
Qiang Xue committed
19 20 21

Yii::setAlias('@yiiunit', __DIR__);

Qiang Xue committed
22
require_once(__DIR__ . '/TestCase.php');