Commit c0f11670 by Evgeniy Tkachenko Committed by githubjeka

Move fixture configuration in config file

parent dfe56987
...@@ -15,17 +15,7 @@ $config = yii\helpers\ArrayHelper::merge( ...@@ -15,17 +15,7 @@ $config = yii\helpers\ArrayHelper::merge(
require(YII_APP_BASE_PATH . '/common/config/main-local.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.php'),
require(YII_APP_BASE_PATH . '/console/config/main-local.php'), require(YII_APP_BASE_PATH . '/console/config/main-local.php'),
require(dirname(__DIR__) . '/config/config.php'), require(dirname(__DIR__) . '/config/config.php')
[
'controllerMap' => [
'fixture' => [
'class' => 'yii\faker\FixtureController',
'fixtureDataPath' => '@tests/codeception/common/fixtures/data',
'templatePath' => '@tests/codeception/common/templates/fixtures',
'namespace' => 'tests\codeception\common\fixtures',
],
],
]
); );
$application = new yii\console\Application($config); $application = new yii\console\Application($config);
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
* Application configuration shared by all applications and test types * Application configuration shared by all applications and test types
*/ */
return [ return [
[
'controllerMap' => [
'fixture' => [
'class' => 'yii\faker\FixtureController',
'fixtureDataPath' => '@tests/codeception/common/fixtures/data',
'templatePath' => '@tests/codeception/common/templates/fixtures',
'namespace' => 'tests\codeception\common\fixtures',
],
],
],
'components' => [ 'components' => [
'db' => [ 'db' => [
'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_tests', 'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_tests',
......
...@@ -12,17 +12,7 @@ require_once __DIR__ . '/_bootstrap.php'; ...@@ -12,17 +12,7 @@ require_once __DIR__ . '/_bootstrap.php';
$config = yii\helpers\ArrayHelper::merge( $config = yii\helpers\ArrayHelper::merge(
require(YII_APP_BASE_PATH . '/config/console.php'), require(YII_APP_BASE_PATH . '/config/console.php'),
require(__DIR__ . '/../config/config.php'), require(__DIR__ . '/../config/config.php')
[
'controllerMap' => [
'fixture' => [
'class' => 'yii\faker\FixtureController',
'fixtureDataPath' => '@tests/codeception/fixtures',
'templatePath' => '@tests/codeception/templates',
'namespace' => 'tests\codeception\fixtures',
],
],
]
); );
$application = new yii\console\Application($config); $application = new yii\console\Application($config);
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
* Application configuration shared by all test types * Application configuration shared by all test types
*/ */
return [ return [
[
'controllerMap' => [
'fixture' => [
'class' => 'yii\faker\FixtureController',
'fixtureDataPath' => '@tests/codeception/fixtures',
'templatePath' => '@tests/codeception/templates',
'namespace' => 'tests\codeception\fixtures',
],
],
],
'components' => [ 'components' => [
'db' => [ 'db' => [
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_tests', 'dsn' => 'mysql:host=localhost;dbname=yii2_basic_tests',
......
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