index-test.php 511 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 5 6
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
	die('You are not allowed to access this file.');
}
Mark committed
7

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

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();