Commit 91a95725 by Mark

method names fixed

parent a4d967ca
...@@ -49,38 +49,38 @@ Loading fixtures ...@@ -49,38 +49,38 @@ Loading fixtures
Fixture classes should be suffixed by `Fixture` class. By default fixtures will be searched under `tests\unit\fixtures` namespace, you can Fixture classes should be suffixed by `Fixture` class. By default fixtures will be searched under `tests\unit\fixtures` namespace, you can
change this behavior with config or command options. change this behavior with config or command options.
To apply fixture, run the following command: To load fixture, run the following command:
``` ```
yii fixture/apply <fixture_name> yii fixture/load <fixture_name>
``` ```
The required `fixture_name` parameter specifies a fixture name which data will be loaded. You can load several fixtures at once. The required `fixture_name` parameter specifies a fixture name which data will be loaded. You can load several fixtures at once.
Below are correct formats of this command: Below are correct formats of this command:
``` ```
// apply `users` fixture // load `users` fixture
yii fixture/apply User yii fixture/load User
// same as above, because default action of "fixture" command is "apply" // same as above, because default action of "fixture" command is "apply"
yii fixture User yii fixture User
// apply several fixtures. Note that there should not be any whitespace between ",", it should be one string. // load several fixtures. Note that there should not be any whitespace between ",", it should be one string.
yii fixture User,UserProfile yii fixture User,UserProfile
// apply all fixtures // load all fixtures
yii fixture/apply all yii fixture/apply all
// same as above // same as above
yii fixture all yii fixture all
// apply fixtures, but for other database connection. // load fixtures, but for other database connection.
yii fixtures User --db='customDbConnectionId' yii fixtures User --db='customDbConnectionId'
// apply fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures. // load fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures.
yii fixtures User --namespace='alias\my\custom\namespace' yii fixtures User --namespace='alias\my\custom\namespace'
// apply global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. // load global fixture `some\name\space\CustomFixture` before other fixtures will be loaded.
// By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several // By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several
// global fixtures separated by comma. // global fixtures separated by comma.
yii fixtures User --globalFixtures='some\name\space\Custom' yii fixtures User --globalFixtures='some\name\space\Custom'
...@@ -93,13 +93,13 @@ To unload fixture, run the following command: ...@@ -93,13 +93,13 @@ To unload fixture, run the following command:
``` ```
// unload Users fixture, by default it will clear fixture storage (for example "users" table, or "users" collection if this is mongodb fixture). // unload Users fixture, by default it will clear fixture storage (for example "users" table, or "users" collection if this is mongodb fixture).
yii fixture/clear User yii fixture/unload User
// Unload several fixtures. Note that there should not be any whitespace between ",", it should be one string. // Unload several fixtures. Note that there should not be any whitespace between ",", it should be one string.
yii fixture/clear User,UserProfile yii fixture/unload User,UserProfile
// unload all fixtures // unload all fixtures
yii fixture/clear all yii fixture/unload all
``` ```
Same command options like: `db`, `namespace`, `globalFixtures` also can be applied to this command. Same command options like: `db`, `namespace`, `globalFixtures` also can be applied to this command.
......
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