Explorar o código

Move fixture configuration in config file

Evgeniy Tkachenko %!s(int64=11) %!d(string=hai) anos
pai
achega
d0d066faad
Modificáronse 2 ficheiros con 11 adicións e 11 borrados
  1. 1 11
      tests/codeception/bin/yii
  2. 10 0
      tests/codeception/config/config.php

+ 1 - 11
tests/codeception/bin/yii

@@ -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);

+ 10 - 0
tests/codeception/config/config.php

@@ -3,6 +3,16 @@
  * 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',