If we are using fixture that loads data into database then these rows will be applied to `users` table. If we are using nosql fixtures, for example `mongodb`
If we are using fixture that loads data into database then these rows will be applied to `users` table. If we are using nosql fixtures, for example `mongodb`
fixture, then this data will be applied to `users` mongodb collection. In order to learn about implementing various loading strategies and more, refer to official [documentation](https://github.com/yiisoft/yii2/blob/master/docs/guide/test-fixture.md).
fixture, then this data will be applied to `users` mongodb collection. In order to learn about implementing various loading strategies and more, refer to official [documentation](https://github.com/yiisoft/yii2/blob/master/docs/guide/test-fixture.md).
Above fixture example was auto-generated by `yii2-faker` extension, read more about it in these [section](#auto-generating-fixtures).
Above fixture example was auto-generated by `yii2-faker` extension, read more about it in these [section](#auto-generating-fixtures).
Fixture classes name should not be plural.
Loading fixtures
Loading fixtures
----------------
----------------
...
@@ -57,13 +58,13 @@ Below are correct formats of this command:
...
@@ -57,13 +58,13 @@ Below are correct formats of this command:
```
```
// apply `users` fixture
// apply `users` fixture
yii fixture/apply Users
yii fixture/apply 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 Users
yii fixture User
// apply several fixtures. Note that there should not be any whitespace between ",", it should be one string.
// apply several fixtures. Note that there should not be any whitespace between ",", it should be one string.
yii fixture Users,UsersProfiles
yii fixture User,UserProfile
// apply all fixtures
// apply all fixtures
yii fixture/apply all
yii fixture/apply all
...
@@ -71,17 +72,11 @@ yii fixture/apply all
...
@@ -71,17 +72,11 @@ yii fixture/apply all
// same as above
// same as above
yii fixture all
yii fixture all
// apply Users fixture, but fixture will be taken from different path.