Adjusted test configs structure

This commit is contained in:
Alexander Makarov 2014-08-17 18:45:58 +04:00
parent e7dcdf7c71
commit 229c352f78
13 changed files with 33 additions and 30 deletions

View File

@ -1,3 +1,2 @@
<?php
new yii\web\Application(require(__DIR__ . '/_config.php'));
new yii\web\Application(require(dirname(__DIR__) . '/config/acceptance.php'));

View File

@ -1,7 +1,5 @@
<?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
// fcgi doesn't have STDIN and STDOUT defined by default

View File

@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
*/
require_once __DIR__ . '/_console_bootstrap.php';
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(ROOT_DIR . '/config/console.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
'db' => [

View File

@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
*/
require_once __DIR__ . '/_console_bootstrap.php';
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(ROOT_DIR . '/config/console.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
'db' => [

View File

@ -8,11 +8,11 @@
* @license http://www.yiiframework.com/license/
*/
require_once __DIR__ . '/_console_bootstrap.php';
require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require(ROOT_DIR . '/config/console.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/../config/config.php'),
[
'components' => [
'db' => [

View File

@ -1,8 +1,10 @@
<?php
/**
* Application configuration for acceptance tests
*/
return yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../../config/web.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/config.php'),
[
'components' => [
'db' => [

View File

@ -1,6 +1,6 @@
<?php
/**
* application configurations shared by all test types
* Application configuration shared by all test types
*/
return [
'components' => [

View File

@ -2,9 +2,12 @@
$_SERVER['SCRIPT_FILENAME'] = TEST_ENTRY_FILE;
$_SERVER['SCRIPT_NAME'] = TEST_ENTRY_URL;
/**
* Application configuration for functional tests
*/
return yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../../config/web.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/config.php'),
[
'components' => [
'db' => [

View File

@ -1,8 +1,10 @@
<?php
/**
* Application configuration for unit tests
*/
return yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../../config/web.php'),
require(__DIR__ . '/../_config.php'),
require(__DIR__ . '/config.php'),
[
'components' => [
'db' => [

View File

@ -13,4 +13,4 @@ modules:
- Yii2
config:
Yii2:
configFile: 'codeception/functional/_config.php'
configFile: 'codeception/config/functional.php'

View File

@ -1,3 +1,2 @@
<?php
new yii\web\Application(require(__DIR__ . '/_config.php'));
new yii\web\Application(require(dirname(__DIR__) . '/config/functional.php'));

View File

@ -11,6 +11,6 @@ defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/../tests/codeception/acceptance/_config.php');
$config = require(__DIR__ . '/../tests/codeception/config/acceptance.php');
(new yii\web\Application($config))->run();