Commit 65844bf5 by Alexander Makarov

Merge pull request #7082 from githubjeka/faker-config

Move fixture configuration in config file
parents a6314c87 2ef29fad
...@@ -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,14 @@ ...@@ -3,6 +3,14 @@
* 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,14 @@ ...@@ -3,6 +3,14 @@
* 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