mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Merge pull request #7082 from githubjeka/faker-config
Move fixture configuration in config file
This commit is contained in:
@ -15,17 +15,7 @@ $config = yii\helpers\ArrayHelper::merge(
|
||||
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/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',
|
||||
],
|
||||
],
|
||||
]
|
||||
require(dirname(__DIR__) . '/config/config.php')
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
* Application configuration shared by all applications and test types
|
||||
*/
|
||||
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' => [
|
||||
'db' => [
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_tests',
|
||||
|
||||
@ -12,17 +12,7 @@ require_once __DIR__ . '/_bootstrap.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require(YII_APP_BASE_PATH . '/config/console.php'),
|
||||
require(__DIR__ . '/../config/config.php'),
|
||||
[
|
||||
'controllerMap' => [
|
||||
'fixture' => [
|
||||
'class' => 'yii\faker\FixtureController',
|
||||
'fixtureDataPath' => '@tests/codeception/fixtures',
|
||||
'templatePath' => '@tests/codeception/templates',
|
||||
'namespace' => 'tests\codeception\fixtures',
|
||||
],
|
||||
],
|
||||
]
|
||||
require(__DIR__ . '/../config/config.php')
|
||||
);
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
* Application configuration shared by all test types
|
||||
*/
|
||||
return [
|
||||
'controllerMap' => [
|
||||
'fixture' => [
|
||||
'class' => 'yii\faker\FixtureController',
|
||||
'fixtureDataPath' => '@tests/codeception/fixtures',
|
||||
'templatePath' => '@tests/codeception/templates',
|
||||
'namespace' => 'tests\codeception\fixtures',
|
||||
],
|
||||
],
|
||||
'components' => [
|
||||
'db' => [
|
||||
'dsn' => 'mysql:host=localhost;dbname=yii2_basic_tests',
|
||||
|
||||
Reference in New Issue
Block a user