Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
91a95725
Commit
91a95725
authored
Feb 04, 2014
by
Mark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method names fixed
parent
a4d967ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
console-fixture.md
docs/guide/console-fixture.md
+12
-12
No files found.
docs/guide/console-fixture.md
View file @
91a95725
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment