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
a4b6eeca
Commit
a4b6eeca
authored
Jan 20, 2014
by
kate-kate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring according to the new version
parent
719a721e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
ActiveFixture.php
extensions/mongodb/ActiveFixture.php
+3
-11
No files found.
extensions/mongodb/ActiveFixture.php
View file @
a4b6eeca
...
...
@@ -16,7 +16,6 @@ class ActiveFixture extends \yii\test\BaseActiveFixture
*/
public
$collectionName
;
public
$loadSchema
=
false
;
/**
* @var string the file path or path alias of the data file that contains the fixture data
* and will be loaded by [[loadData()]]. If this is not set, it will default to `FixturePath/data/TableName.php`,
...
...
@@ -24,12 +23,6 @@ class ActiveFixture extends \yii\test\BaseActiveFixture
* name of the table associated with this fixture.
*/
public
$dataFile
;
/**
* @var boolean whether to reset the collection associated with this fixture.
* By setting this property to be true, when [[loadData()]] is called, all existing data in the table
* will be removed and the sequence number (if any) will be reset.
*/
public
$resetCollection
=
true
;
/**
* @inheritdoc
...
...
@@ -48,11 +41,10 @@ class ActiveFixture extends \yii\test\BaseActiveFixture
* The default implementation will first reset the DB table and then populate it with the data
* returned by [[getData()]].
*/
p
rotected
function
loadData
()
p
ublic
function
load
()
{
if
(
$this
->
resetCollection
)
{
$this
->
resetCollection
();
}
$this
->
resetCollection
();
foreach
(
$this
->
getData
()
as
$alias
=>
$row
)
{
$this
->
getCollection
()
->
insert
(
$row
);
$this
->
data
[
$alias
]
=
$row
;
...
...
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