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
033d66de
Commit
033d66de
authored
Aug 20, 2014
by
Mark
Committed by
Qiang Xue
Aug 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed format of applying command to all
parent
c7887b66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
FixtureController.php
framework/console/controllers/FixtureController.php
+1
-1
FixtureControllerTest.php
...t/framework/console/controllers/FixtureControllerTest.php
+4
-4
No files found.
framework/console/controllers/FixtureController.php
View file @
033d66de
...
@@ -46,7 +46,7 @@ class FixtureController extends Controller
...
@@ -46,7 +46,7 @@ class FixtureController extends Controller
/**
/**
* type of fixture apply to database
* type of fixture apply to database
*/
*/
const
APPLY_ALL
=
'
all
'
;
const
APPLY_ALL
=
'
*
'
;
/**
/**
* @var string controller default action ID.
* @var string controller default action ID.
...
...
tests/unit/framework/console/controllers/FixtureControllerTest.php
View file @
033d66de
...
@@ -77,7 +77,7 @@ class FixtureControllerTest extends TestCase
...
@@ -77,7 +77,7 @@ class FixtureControllerTest extends TestCase
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be empty'
);
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be empty'
);
$this
->
assertEmpty
(
FixtureStorage
::
$secondFixtureData
,
'second fixture data should be empty'
);
$this
->
assertEmpty
(
FixtureStorage
::
$secondFixtureData
,
'second fixture data should be empty'
);
$this
->
_fixtureController
->
actionLoad
(
'
all
'
);
$this
->
_fixtureController
->
actionLoad
(
'
*
'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$globalFixturesData
,
'global fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$globalFixturesData
,
'global fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
...
@@ -94,7 +94,7 @@ class FixtureControllerTest extends TestCase
...
@@ -94,7 +94,7 @@ class FixtureControllerTest extends TestCase
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$secondFixtureData
,
'second fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$secondFixtureData
,
'second fixture data should be loaded'
);
$this
->
_fixtureController
->
actionUnload
(
'
all
'
);
$this
->
_fixtureController
->
actionUnload
(
'
*
'
);
$this
->
assertEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should be unloaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should be unloaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be unloaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be unloaded'
);
...
@@ -125,7 +125,7 @@ class FixtureControllerTest extends TestCase
...
@@ -125,7 +125,7 @@ class FixtureControllerTest extends TestCase
public
function
testLoadAllExceptOnes
()
public
function
testLoadAllExceptOnes
()
{
{
$this
->
_fixtureController
->
actionLoad
(
'
all
'
,
'-Second'
,
'-Global'
);
$this
->
_fixtureController
->
actionLoad
(
'
*
'
,
'-Second'
,
'-Global'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
$this
->
assertCount
(
1
,
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be loaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should not be loaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should not be loaded'
);
...
@@ -138,7 +138,7 @@ class FixtureControllerTest extends TestCase
...
@@ -138,7 +138,7 @@ class FixtureControllerTest extends TestCase
FixtureStorage
::
$firstFixtureData
[]
=
'some seeded first fixture data'
;
FixtureStorage
::
$firstFixtureData
[]
=
'some seeded first fixture data'
;
FixtureStorage
::
$secondFixtureData
[]
=
'some seeded second fixture data'
;
FixtureStorage
::
$secondFixtureData
[]
=
'some seeded second fixture data'
;
$this
->
_fixtureController
->
actionUnload
(
'
all
'
,
'-Second'
,
'-Global'
);
$this
->
_fixtureController
->
actionUnload
(
'
*
'
,
'-Second'
,
'-Global'
);
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be unloaded'
);
$this
->
assertEmpty
(
FixtureStorage
::
$firstFixtureData
,
'first fixture data should be unloaded'
);
$this
->
assertNotEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should not be unloaded'
);
$this
->
assertNotEmpty
(
FixtureStorage
::
$globalFixturesData
,
'global fixture data should not be unloaded'
);
...
...
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