Commit 493fbf8c1123d0a1ff526f662b1046f88a428045

Authored by Administrator
1 parent 75ea1564

Adding indexes

Showing 2 changed files with 37 additions and 0 deletions   Show diff stats
backend/web/index-test.php 0 → 100644
  1 +<?php
  2 +
  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 +}
  7 +
  8 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  9 +defined('YII_ENV') or define('YII_ENV', 'test');
  10 +
  11 +require(__DIR__ . '/../../vendor/autoload.php');
  12 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  13 +require(__DIR__ . '/../../common/config/bootstrap.php');
  14 +require(__DIR__ . '/../config/bootstrap.php');
  15 +
  16 +
  17 +$config = require(__DIR__ . '/../../tests/codeception/config/backend/acceptance.php');
  18 +
  19 +(new yii\web\Application($config))->run();
... ...
backend/web/index.php 0 → 100644
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  3 +defined('YII_ENV') or define('YII_ENV', 'dev');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
... ...