Move fixture configuration in config file
This commit is contained in:
parent
d59a57c383
commit
d0d066faad
@ -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 @@
|
|||||||
* 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',
|
||||||
|
Loading…
Reference in New Issue
Block a user