Преглед изворни кода

Modified default @tests value and updated READMEs.

Yasser Hassan пре 10 година
родитељ
комит
4e8ed67326
3 измењених фајлова са 23 додато и 4 уклоњено
  1. 4 3
      README.md
  2. 8 1
      config/console.php
  3. 11 0
      tests/README.md

+ 4 - 3
README.md

@@ -96,6 +96,7 @@ return [
 ];
 ```
 
-**NOTE:** Yii won't create the database for you, this has to be done manually before you can access it.
-
-Also check and edit the other files in the `config/` directory to customize your application.
+**NOTES:**
+- Yii won't create the database for you, this has to be done manually before you can access it.
+- Check and edit the other files in the `config/` directory to customize your application as required.
+- Refer to the README in the `tests` direcotry for information specific to basic application tests.

+ 8 - 1
config/console.php

@@ -1,6 +1,6 @@
 <?php
 
-Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
+Yii::setAlias('@tests', dirname(__DIR__) . '/tests/codeception');
 
 $params = require(__DIR__ . '/params.php');
 $db = require(__DIR__ . '/db.php');
@@ -25,6 +25,13 @@ $config = [
         'db' => $db,
     ],
     'params' => $params,
+    /*
+    'controllerMap' => [
+        'fixture' => [ // Fixture generation command line.
+            'class' => 'yii\faker\FixtureController',
+        ],
+    ],
+    */
 ];
 
 if (YII_ENV_DEV) {

+ 11 - 0
tests/README.md

@@ -62,6 +62,17 @@ webserver. In the `web` directory execute the following:
    codecept run unit
    ```
 
+Fixtures Default Configuration
+------------------------------
+The `fixture` commands refer to the following `ActiveFixture` configuration by default:
+
+- Fixtures path: `@tests/unit/fixtures`
+- Fixtures data path: `@tests/unit/fixtures/data`
+- Template files path: `@tests/unit/templates/fixtures`
+- Namespace: `tests\unit\fixtures`
+
+Where `@tests` refers to `@app/tests/codeception`.
+
 Code coverage support
 ---------------------