-
Notifications
You must be signed in to change notification settings - Fork 1
/
index-test.php
33 lines (29 loc) · 1.44 KB
/
index-test.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
33
<?php
/**
* @copyright Copyright (C) 2016 Usha Singhai Neo Informatique Pvt. Ltd
* @license https://www.gnu.org/licenses/gpl.html
*/
// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']))
{
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('APPLICATION_PATH') or define('APPLICATION_PATH', dirname(dirname(dirname(__FILE__))));
defined('USNI_PATH') or define('USNI_PATH', APPLICATION_PATH . '/vendor/ushainformatique/yiichimp');
defined('BACKEND_APPLICATION_PATH') or define('BACKEND_APPLICATION_PATH', APPLICATION_PATH . '/backend');
require(APPLICATION_PATH . '/vendor/autoload.php');
require(APPLICATION_PATH . '/vendor/yiisoft/yii2/Yii.php');
require(APPLICATION_PATH . '/common/config/bootstrap.php');
require(BACKEND_APPLICATION_PATH . '/config/bootstrap.php');
$config = yii\helpers\ArrayHelper::merge(
require(APPLICATION_PATH . '/common/config/main.php'),
require(APPLICATION_PATH . '/common/config/main-local.php'),
require(APPLICATION_PATH . '/backend/config/main.php'),
require(APPLICATION_PATH . '/backend/config/main-local.php'),
require(APPLICATION_PATH . '/tests/backend/config.php'),
require(APPLICATION_PATH . '/tests/backend/functional.php')
);
$application = new backend\web\AdminApplication($config);
$application->run();