index-test.php 514 Bytes
Newer Older
Mark committed
1 2
<?php

Qiang Xue committed
3
// NOTE: Make sure this file is not accessible when deployed to production
4
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
5
    die('You are not allowed to access this file.');
6
}
Mark committed
7

8 9
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
Mark committed
10

11
require(__DIR__ . '/../vendor/autoload.php');
Qiang Xue committed
12
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
Mark committed
13

14
$config = require(__DIR__ . '/../tests/acceptance/_config.php');
Mark committed
15

Qiang Xue committed
16
(new yii\web\Application($config))->run();