Completed
Push — master ( fcdf89...4a0ecc )
by Alexander
14:58
created

tests/bootstrap.php (1 issue)

1
<?php
2
use hiqdev\composer\config\Builder;
3
use yii\helpers\Yii;
4
use Yiisoft\Di\Container;
5
6
// ensure we get report on all possible php errors
7
error_reporting(E_ALL);
8
9
$_SERVER['SCRIPT_NAME'] = '/' . __DIR__;
10
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
11
12
(function () {
13
    $composerAutoload = __DIR__ . '/../vendor/autoload.php';
14
    if (!is_file($composerAutoload)) {
15
        die('You need to set up the project dependencies using Composer');
0 ignored issues
show
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
16
    }
17
18
    require_once $composerAutoload;
19
20
    $container = new Container(require Builder::path('tests'));
21
22
    Yii::setContainer($container);
23
})();
24