Commit 5d67ac44 by Alexander Makarov

Renamed YII_ROOT_DIR → YII_APP_BASE_PATH

parent 02f89455
......@@ -2,14 +2,14 @@
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
defined('YII_BACKEND_TEST_ENTRY_URL') or define('YII_BACKEND_TEST_ENTRY_URL', \Codeception\Configuration::config()['config']['test_entry_url']);
defined('YII_TEST_BACKEND_ENTRY_FILE') or define('YII_TEST_BACKEND_ENTRY_FILE', YII_ROOT_DIR . '/backend/web/index-test.php');
defined('YII_TEST_BACKEND_ENTRY_FILE') or define('YII_TEST_BACKEND_ENTRY_FILE', YII_APP_BASE_PATH . '/backend/web/index-test.php');
require_once(YII_ROOT_DIR . '/vendor/autoload.php');
require_once(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require(YII_ROOT_DIR . '/common/config/aliases.php');
require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require(YII_APP_BASE_PATH . '/common/config/aliases.php');
// set correct script paths
......
......@@ -11,11 +11,11 @@
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
require_once(YII_ROOT_DIR . '/vendor/autoload.php');
require_once(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require_once(YII_ROOT_DIR . '/common/config/aliases.php');
require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require_once(YII_APP_BASE_PATH . '/common/config/aliases.php');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
......@@ -11,10 +11,10 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/console/config/main.php'),
require(YII_ROOT_DIR . '/console/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/console/config/main.php'),
require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
require(dirname(__DIR__) . '/config/acceptance.php'),
[
'controllerMap' => [
......
......@@ -11,10 +11,10 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/console/config/main.php'),
require(YII_ROOT_DIR . '/console/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/console/config/main.php'),
require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
require(dirname(__DIR__) . '/config/functional.php'),
[
'controllerMap' => [
......
......@@ -11,10 +11,10 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/console/config/main.php'),
require(YII_ROOT_DIR . '/console/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/console/config/main.php'),
require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
require(dirname(__DIR__) . '/config/unit.php'),
[
'controllerMap' => [
......
......@@ -2,11 +2,11 @@
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
require_once(YII_ROOT_DIR . '/vendor/autoload.php');
require_once(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require(YII_ROOT_DIR . '/common/config/aliases.php');
require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require(YII_APP_BASE_PATH . '/common/config/aliases.php');
// set correct script paths
$_SERVER['SERVER_NAME'] = 'localhost';
......
<?php
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(dirname(__DIR__)))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(dirname(__DIR__)))));
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/backend/config/main.php'),
require(YII_ROOT_DIR . '/backend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/acceptance.php'),
require(__DIR__ . '/config.php'),
......
......@@ -3,10 +3,10 @@ $_SERVER['SCRIPT_FILENAME'] = YII_TEST_BACKEND_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = YII_BACKEND_TEST_ENTRY_URL;
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/backend/config/main.php'),
require(YII_ROOT_DIR . '/backend/config/main-local.php'),
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/functional.php'),
require(__DIR__ . '/config.php'),
......
<?php
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/backend/config/main.php'),
require(YII_ROOT_DIR . '/backend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/backend/config/main.php'),
require(YII_APP_BASE_PATH . '/backend/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/unit.php'),
require(__DIR__ . '/config.php'),
......
......@@ -3,8 +3,8 @@
* Application config for common unit tests
*/
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/unit.php'),
[
......
<?php
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/console/config/main.php'),
require(YII_ROOT_DIR . '/console/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/console/config/main.php'),
require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/unit.php'),
[
......
<?php
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(dirname(__DIR__)))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(dirname(__DIR__)))));
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/frontend/config/main.php'),
require(YII_ROOT_DIR . '/frontend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/acceptance.php'),
require(__DIR__ . '/config.php'),
......
......@@ -3,10 +3,10 @@ $_SERVER['SCRIPT_FILENAME'] = FRONTEND_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = FRONTEND_ENTRY_URL;
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/frontend/config/main.php'),
require(YII_ROOT_DIR . '/frontend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/functional.php'),
require(__DIR__ . '/config.php'),
......
<?php
return yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/common/config/main.php'),
require(YII_ROOT_DIR . '/common/config/main-local.php'),
require(YII_ROOT_DIR . '/frontend/config/main.php'),
require(YII_ROOT_DIR . '/frontend/config/main-local.php'),
require(YII_APP_BASE_PATH . '/common/config/main.php'),
require(YII_APP_BASE_PATH . '/common/config/main-local.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main.php'),
require(YII_APP_BASE_PATH . '/frontend/config/main-local.php'),
require(dirname(__DIR__) . '/config.php'),
require(dirname(__DIR__) . '/unit.php'),
require(__DIR__ . '/config.php'),
......
......@@ -2,11 +2,11 @@
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
require_once(YII_ROOT_DIR . '/vendor/autoload.php');
require_once(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require(YII_ROOT_DIR . '/common/config/aliases.php');
require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require(YII_APP_BASE_PATH . '/common/config/aliases.php');
// set correct script paths
$_SERVER['SERVER_NAME'] = 'localhost';
......
......@@ -2,14 +2,14 @@
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
defined('FRONTEND_ENTRY_URL') or define('FRONTEND_ENTRY_URL', \Codeception\Configuration::config()['config']['test_entry_url']);
defined('FRONTEND_ENTRY_FILE') or define('FRONTEND_ENTRY_FILE', YII_ROOT_DIR . '/frontend/web/index-test.php');
defined('FRONTEND_ENTRY_FILE') or define('FRONTEND_ENTRY_FILE', YII_APP_BASE_PATH . '/frontend/web/index-test.php');
require_once(YII_ROOT_DIR . '/vendor/autoload.php');
require_once(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require(YII_ROOT_DIR . '/common/config/aliases.php');
require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require(YII_APP_BASE_PATH . '/common/config/aliases.php');
// set correct script paths
......
......@@ -6,7 +6,7 @@ defined('YII_ENV') or define('YII_ENV', 'test');
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
defined('YII_ROOT_DIR') or define('YII_ROOT_DIR', dirname(dirname(dirname(__DIR__))));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
require(YII_ROOT_DIR . '/vendor/autoload.php');
require(YII_ROOT_DIR . '/vendor/yiisoft/yii2/Yii.php');
require(YII_APP_BASE_PATH . '/vendor/autoload.php');
require(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
......@@ -11,7 +11,7 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/config/console.php'),
require(YII_APP_BASE_PATH . '/config/console.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
......
......@@ -11,7 +11,7 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/config/console.php'),
require(YII_APP_BASE_PATH . '/config/console.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
......
......@@ -11,7 +11,7 @@
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(YII_ROOT_DIR . '/config/console.php'),
require(YII_APP_BASE_PATH . '/config/console.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment