Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EcomDev_PHPUnit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open
EcomDev_PHPUnit
Commits
02690886
Commit
02690886
authored
Oct 26, 2013
by
Mike Pretzlaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Database Loader Stub and lazy loading in Db_Info
parent
871fb939
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
3 deletions
+64
-3
app/code/community/EcomDev/PHPUnit/Model/Fixture/Loader/Database.php
...mmunity/EcomDev/PHPUnit/Model/Fixture/Loader/Database.php
+56
-0
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Db/Info.php
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Db/Info.php
+8
-3
No files found.
app/code/community/EcomDev/PHPUnit/Model/Fixture/Loader/Database.php
0 → 100644
View file @
02690886
<?php
class
EcomDev_PHPUnit_Model_Fixture_Loader_Database
implements
EcomDev_PHPUnit_Model_Fixture_LoaderInterface
{
/**
* Flushes the data that was added before loading
*
* @return mixed
*/
public
function
flush
()
{
// TODO: Implement flush() method.
}
/**
* This one should realize possibility to merge data with existing Magento data
*
* @param $data
*
* @return mixed
*/
public
function
merge
(
$data
)
{
// TODO: Implement merge() method.
}
/**
* Overrides the data in the system for specified data
*
* It should realize default functionality
* for a default fixture processors
*
* @param array $data
*
* @return $this
* @throws InvalidArgumentException
*/
public
function
override
(
$data
)
{
// TODO: Implement override() method.
}
/**
* Restores original data, that was modified by fixture flushing
*
* @return mixed
*/
public
function
restore
()
{
// TODO: Implement restore() method.
}
}
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Db/Info.php
View file @
02690886
...
...
@@ -16,8 +16,9 @@ class EcomDev_PHPUnit_Model_Mysql4_Db_Info implements EcomDev_PHPUnit_Model_Mysq
*/
public
function
fetch
()
{
// reset information
$this
->
reset
();
if
(
$this
->
_information
!==
null
)
{
return
$this
;
}
// iterate over each available table
$listTables
=
$this
->
getAdapter
()
->
listTables
();
...
...
@@ -42,6 +43,8 @@ class EcomDev_PHPUnit_Model_Mysql4_Db_Info implements EcomDev_PHPUnit_Model_Mysq
$this
->
_information
[
$tableName
]
=
$data
;
}
return
$this
;
}
...
...
@@ -65,6 +68,8 @@ class EcomDev_PHPUnit_Model_Mysql4_Db_Info implements EcomDev_PHPUnit_Model_Mysq
*/
public
function
getTableDependencies
(
$tableName
)
{
$this
->
fetch
();
if
(
isset
(
$this
->
_information
[
$tableName
])
&&
$this
->
_information
[
$tableName
]
instanceof
Varien_Object
)
...
...
@@ -83,7 +88,7 @@ class EcomDev_PHPUnit_Model_Mysql4_Db_Info implements EcomDev_PHPUnit_Model_Mysq
*/
public
function
reset
()
{
$this
->
_information
=
array
()
;
$this
->
_information
=
null
;
}
...
...
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