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
01d53b80
Commit
01d53b80
authored
Oct 31, 2014
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.3.7'
parents
decb1d48
cdc21297
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
279 additions
and
13 deletions
+279
-13
app/code/community/EcomDev/PHPUnit/Model/Fixture/Processor/Eav.php
...community/EcomDev/PHPUnit/Model/Fixture/Processor/Eav.php
+30
-6
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/AbstractEav.php
...nity/EcomDev/PHPUnit/Model/Mysql4/Fixture/AbstractEav.php
+110
-3
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Catalog/Category.php
...Dev/PHPUnit/Model/Mysql4/Fixture/Eav/Catalog/Category.php
+27
-0
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/RestoreAwareInterface.php
...ev/PHPUnit/Model/Mysql4/Fixture/RestoreAwareInterface.php
+28
-0
app/code/community/EcomDev/PHPUnit/Test/Case.php
app/code/community/EcomDev/PHPUnit/Test/Case.php
+1
-0
app/code/community/EcomDev/PHPUnit/Test/Case/Helper/Mock.php
app/code/community/EcomDev/PHPUnit/Test/Case/Helper/Mock.php
+15
-0
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
+2
-1
app/code/community/EcomDev/PHPUnit/Test/Listener.php
app/code/community/EcomDev/PHPUnit/Test/Listener.php
+3
-3
app/code/community/EcomDev/PHPUnit/etc/config.xml
app/code/community/EcomDev/PHPUnit/etc/config.xml
+31
-0
lib/EcomDev/PHPUnit/Mock/Proxy.php
lib/EcomDev/PHPUnit/Mock/Proxy.php
+32
-0
No files found.
app/code/community/EcomDev/PHPUnit/Model/Fixture/Processor/Eav.php
View file @
01d53b80
...
@@ -89,10 +89,15 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Eav
...
@@ -89,10 +89,15 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Eav
$this
->
getResource
()
->
beginTransaction
();
$this
->
getResource
()
->
beginTransaction
();
foreach
(
$data
as
$entityType
=>
$values
)
{
foreach
(
$data
as
$entityType
=>
$values
)
{
$eavLoaders
[]
=
$this
->
_getEavLoader
(
$entityType
)
$eavLoaders
[
$entityType
]
=
$this
->
_getEavLoader
(
$entityType
)
->
setFixture
(
$fixture
)
->
setFixture
(
$fixture
)
->
setOptions
(
$fixture
->
getOptions
())
->
setOptions
(
$fixture
->
getOptions
());
->
loadEntity
(
$entityType
,
$values
);
if
(
$eavLoaders
[
$entityType
]
instanceof
EcomDev_PHPUnit_Model_Mysql4_Fixture_RestoreAwareInterface
)
{
$eavLoaders
[
$entityType
]
->
saveData
(
$entityType
);
}
$eavLoaders
[
$entityType
]
->
loadEntity
(
$entityType
,
$values
);
}
}
$this
->
getResource
()
->
commit
();
$this
->
getResource
()
->
commit
();
...
@@ -126,16 +131,35 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Eav
...
@@ -126,16 +131,35 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Eav
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_SHARED
);
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_SHARED
);
}
}
$typesToRestore
=
array
();
$this
->
getResource
()
->
beginTransaction
();
$this
->
getResource
()
->
beginTransaction
();
foreach
(
array_keys
(
$data
)
as
$entityType
)
{
foreach
(
array_keys
(
$data
)
as
$entityType
)
{
$eavLoader
=
$this
->
_getEavLoader
(
$entityType
);
if
(
in_array
(
$entityType
,
$ignoreCleanUp
))
{
if
(
in_array
(
$entityType
,
$ignoreCleanUp
))
{
if
(
$eavLoader
instanceof
EcomDev_PHPUnit_Model_Mysql4_Fixture_RestoreAwareInterface
)
{
$eavLoader
->
clearData
(
$entityType
);
}
continue
;
continue
;
}
}
$this
->
_getEavLoader
(
$entityType
)
->
cleanEntity
(
$entityType
);
$eavLoader
->
cleanEntity
(
$entityType
);
}
if
(
$eavLoader
instanceof
EcomDev_PHPUnit_Model_Mysql4_Fixture_RestoreAwareInterface
)
{
$typesToRestore
[
$entityType
]
=
$eavLoader
;
}
}
$this
->
getResource
()
->
commit
();
$this
->
getResource
()
->
commit
();
if
(
$typesToRestore
)
{
$this
->
getResource
()
->
beginTransaction
();
foreach
(
$typesToRestore
as
$entityType
=>
$eavLoader
)
{
$eavLoader
->
restoreData
(
$entityType
)
->
clearData
(
$entityType
);
}
$this
->
getResource
()
->
commit
();
}
return
$this
;
return
$this
;
}
}
}
}
\ No newline at end of file
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/AbstractEav.php
View file @
01d53b80
...
@@ -22,7 +22,10 @@
...
@@ -22,7 +22,10 @@
*/
*/
abstract
class
EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
abstract
class
EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
extends
EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractComplex
extends
EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractComplex
implements
EcomDev_PHPUnit_Model_Mysql4_Fixture_RestoreAwareInterface
{
{
const
RESTORE_KEY
=
'restore_%s_data'
;
/**
/**
* List of indexers required to build
* List of indexers required to build
*
*
...
@@ -37,6 +40,20 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
...
@@ -37,6 +40,20 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
*/
*/
protected
$_originalIndexers
=
array
();
protected
$_originalIndexers
=
array
();
/**
* List of tables that should be restored after run
*
* @var string[]
*/
protected
$_restoreTables
=
array
();
/**
* Default data for eav entity
*
* @var array
*/
protected
$_defaultData
=
array
();
/**
/**
* Retrieve required indexers for re-building
* Retrieve required indexers for re-building
*
*
...
@@ -99,6 +116,69 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
...
@@ -99,6 +116,69 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
return
$this
;
return
$this
;
}
}
/**
* Saves data for restoring it after fixture has been cleaned up
*
* @param string $code storage code
* @return $this
*/
public
function
saveData
(
$code
)
{
if
(
$this
->
_restoreTables
)
{
$storageKey
=
sprintf
(
self
::
RESTORE_KEY
,
$code
);
$data
=
array
();
foreach
(
$this
->
_restoreTables
as
$table
)
{
$select
=
$this
->
_getReadAdapter
()
->
select
();
$select
->
from
(
$table
);
$data
[
$table
]
=
$this
->
_getReadAdapter
()
->
fetchAll
(
$select
);
}
$this
->
_fixture
->
setStorageData
(
$storageKey
,
$data
);
}
return
$this
;
}
/**
* Restored saved data
*
* @param string $code storage code
* @return $this
*/
public
function
restoreData
(
$code
)
{
if
(
$this
->
_restoreTables
)
{
$storageKey
=
sprintf
(
self
::
RESTORE_KEY
,
$code
);
$data
=
$this
->
_fixture
->
getStorageData
(
$storageKey
);
foreach
(
$this
->
_restoreTables
as
$table
)
{
if
(
!
empty
(
$data
[
$table
]))
{
$this
->
_getWriteAdapter
()
->
insertOnDuplicate
(
$table
,
$data
[
$table
]
);
}
}
}
return
$this
;
}
/**
* Clears storage from stored backup data
*
* @param $code
* @return $this
*/
public
function
clearData
(
$code
)
{
if
(
$this
->
_restoreTables
)
{
$storageKey
=
sprintf
(
self
::
RESTORE_KEY
,
$code
);
$this
->
_fixture
->
setStorageData
(
$storageKey
,
array
());
}
return
$this
;
}
/**
/**
* Loads EAV data into DB tables
* Loads EAV data into DB tables
*
*
...
@@ -139,16 +219,43 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
...
@@ -139,16 +219,43 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav
// and rows list as value
// and rows list as value
// See getCustomTableRecords
// See getCustomTableRecords
$customValues
=
array
();
$customValues
=
array
();
if
(
$this
->
_defaultData
)
{
$dataToInsert
=
$this
->
_defaultData
;
// Prevent insertion of default data,
// if there is already data available
foreach
(
$values
as
$index
=>
$row
)
{
if
(
isset
(
$row
[
$this
->
_getEntityIdField
(
$entityTypeModel
)])
&&
isset
(
$dataToInsert
[
$this
->
_getEntityIdField
(
$entityTypeModel
)]))
{
$dataToInsert
=
array
();
break
;
}
}
foreach
(
$dataToInsert
as
$row
)
{
array_unshift
(
$values
,
$row
);
}
}
foreach
(
$values
as
$index
=>
&
$row
)
{
foreach
(
$values
as
$index
=>
$row
)
{
if
(
!
isset
(
$row
[
$this
->
_getEntityIdField
(
$entityTypeModel
)]))
{
if
(
!
isset
(
$row
[
$this
->
_getEntityIdField
(
$entityTypeModel
)]))
{
throw
new
RuntimeException
(
'Entity Id should be specified in EAV fixture'
);
throw
new
RuntimeException
(
'Entity Id should be specified in EAV fixture'
);
}
}
// Fulfill necessary information
// Fulfill necessary information
$row
[
'entity_type_id'
]
=
$entityTypeModel
->
getEntityTypeId
();
$values
[
$index
][
'entity_type_id'
]
=
$entityTypeModel
->
getEntityTypeId
();
$row
=
$values
[
$index
];
if
(
!
isset
(
$row
[
'attribute_set_id'
]))
{
if
(
!
isset
(
$row
[
'attribute_set_id'
]))
{
$row
[
'attribute_set_id'
]
=
$entityTypeModel
->
getDefaultAttributeSetId
();
$defaultAttributeSet
=
$entityTypeModel
->
getDefaultAttributeSetId
();
// Fix Magento core issue with attribute set information for customer and its address
if
(
in_array
(
$entityType
,
array
(
'customer'
,
'customer_address'
)))
{
$defaultAttributeSet
=
0
;
}
$values
[
$index
][
'attribute_set_id'
]
=
$defaultAttributeSet
;
}
}
// Preparing entity table record
// Preparing entity table record
...
...
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Catalog/Category.php
View file @
01d53b80
...
@@ -23,9 +23,36 @@
...
@@ -23,9 +23,36 @@
*/
*/
class
EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Catalog_Category
extends
EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Catalog_Abstract
class
EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Catalog_Category
extends
EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Catalog_Abstract
{
{
const
XML_PATH_DEFAULT_DATA
=
'phpunit/suite/fixture/default_data/category'
;
protected
$_requiredIndexers
=
array
(
protected
$_requiredIndexers
=
array
(
'catalog_category_flat'
'catalog_category_flat'
);
);
protected
function
_construct
()
{
parent
::
_construct
();
$defaultData
=
Mage
::
getConfig
()
->
getNode
(
self
::
XML_PATH_DEFAULT_DATA
);
if
(
$defaultData
)
{
foreach
(
$defaultData
->
children
()
as
$item
)
{
if
(
!
isset
(
$item
->
entity_id
))
{
continue
;
}
$entityId
=
(
string
)
$item
->
entity_id
;
$this
->
_defaultData
[
$entityId
]
=
array
();
foreach
(
$item
->
children
()
as
$value
)
{
$this
->
_defaultData
[
$entityId
][
$value
->
getName
()]
=
(
string
)
$value
;
}
}
}
$this
->
_restoreTables
[]
=
$this
->
getTable
(
'catalog/category'
);
foreach
(
array
(
'datetime'
,
'decimal'
,
'int'
,
'text'
,
'varchar'
)
as
$suffix
)
{
$this
->
_restoreTables
[]
=
$this
->
getTable
(
array
(
'catalog/category'
,
$suffix
));
}
}
/**
/**
* Overridden to add easy fixture loading for product associations
* Overridden to add easy fixture loading for product associations
...
...
app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/RestoreAwareInterface.php
0 → 100644
View file @
01d53b80
<?php
interface
EcomDev_PHPUnit_Model_Mysql4_Fixture_RestoreAwareInterface
{
/**
* Saves data for restoring it after fixture has been cleaned up
*
* @param string $code storage code
* @return $this
*/
public
function
saveData
(
$code
);
/**
* Restored saved data
*
* @param string $code storage code
* @return $this
*/
public
function
restoreData
(
$code
);
/**
* Clears storage from stored backup data
*
* @param $code
* @return $this
*/
public
function
clearData
(
$code
);
}
\ No newline at end of file
app/code/community/EcomDev/PHPUnit/Test/Case.php
View file @
01d53b80
...
@@ -24,6 +24,7 @@ use EcomDev_PHPUnit_Helper as TestHelper;
...
@@ -24,6 +24,7 @@ use EcomDev_PHPUnit_Helper as TestHelper;
*
*
* @method EcomDev_PHPUnit_Mock_Proxy mockClassAlias(string $type, $classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockClassAlias(string $type, $classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockModel($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockModel($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockResourceModel($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockBlock($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockBlock($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockHelper($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockHelper($classAlias, array $methods = array(), array $constructorArgs = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockSession($classAlias, array $methods = array())
* @method EcomDev_PHPUnit_Mock_Proxy mockSession($classAlias, array $methods = array())
...
...
app/code/community/EcomDev/PHPUnit/Test/Case/Helper/Mock.php
View file @
01d53b80
...
@@ -55,6 +55,21 @@ class EcomDev_PHPUnit_Test_Case_Helper_Mock extends EcomDev_PHPUnit_AbstractHelp
...
@@ -55,6 +55,21 @@ class EcomDev_PHPUnit_Test_Case_Helper_Mock extends EcomDev_PHPUnit_AbstractHelp
return
$this
->
helperMockClassAlias
(
'model'
,
$classAlias
,
$methods
,
$constructorArgs
);
return
$this
->
helperMockClassAlias
(
'model'
,
$classAlias
,
$methods
,
$constructorArgs
);
}
}
/**
* Creates a mock for a resource model by its class alias
*
* @param string $classAlias
* @param array $methods
* @param array $constructorArgs
*
* @return EcomDev_PHPUnit_Mock_Proxy
*/
public
function
helperMockResourceModel
(
$classAlias
,
array
$methods
=
array
(),
array
$constructorArgs
=
array
())
{
return
$this
->
helperMockClassAlias
(
'resource_model'
,
$classAlias
,
$methods
,
$constructorArgs
);
}
/**
/**
* Creates a mock for a block by its class alias
* Creates a mock for a block by its class alias
*
*
...
...
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
View file @
01d53b80
...
@@ -501,7 +501,7 @@ class EcomDev_PHPUnit_Test_Case_Util
...
@@ -501,7 +501,7 @@ class EcomDev_PHPUnit_Test_Case_Util
public
static
function
getGroupedClassMockBuilder
(
PHPUnit_Framework_TestCase
$testCase
,
$type
,
$classAlias
)
public
static
function
getGroupedClassMockBuilder
(
PHPUnit_Framework_TestCase
$testCase
,
$type
,
$classAlias
)
{
{
$className
=
self
::
getGroupedClassName
(
$type
,
$classAlias
);
$className
=
self
::
getGroupedClassName
(
$type
,
$classAlias
);
return
new
EcomDev_PHPUnit_Mock_Proxy
(
$testCase
,
$className
);
return
new
EcomDev_PHPUnit_Mock_Proxy
(
$testCase
,
$className
,
$classAlias
);
}
}
/**
/**
...
@@ -511,6 +511,7 @@ class EcomDev_PHPUnit_Test_Case_Util
...
@@ -511,6 +511,7 @@ class EcomDev_PHPUnit_Test_Case_Util
public
static
function
setUp
()
public
static
function
setUp
()
{
{
self
::
app
()
->
resetDispatchedEvents
();
self
::
app
()
->
resetDispatchedEvents
();
self
::
$originalStore
=
Mage
::
app
()
->
getStore
()
->
getCode
();
}
}
/**
/**
...
...
app/code/community/EcomDev/PHPUnit/Test/Listener.php
View file @
01d53b80
...
@@ -173,6 +173,9 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
...
@@ -173,6 +173,9 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
));
));
if
(
$test
instanceof
PHPUnit_Framework_TestCase
)
{
if
(
$test
instanceof
PHPUnit_Framework_TestCase
)
{
EcomDev_PHPUnit_Helper
::
tearDown
();
EcomDev_PHPUnit_Test_Case_Util
::
tearDown
();
EcomDev_PHPUnit_Test_Case_Util
::
getFixture
(
get_class
(
$test
))
EcomDev_PHPUnit_Test_Case_Util
::
getFixture
(
get_class
(
$test
))
->
setScope
(
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_LOCAL
)
->
setScope
(
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_LOCAL
)
->
discard
();
// Clear applied fixture
->
discard
();
// Clear applied fixture
...
@@ -180,9 +183,6 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
...
@@ -180,9 +183,6 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
if
(
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
isLoaded
())
{
if
(
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
isLoaded
())
{
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
discard
();
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
discard
();
}
}
EcomDev_PHPUnit_Test_Case_Util
::
tearDown
();
EcomDev_PHPUnit_Helper
::
tearDown
();
}
}
Mage
::
dispatchEvent
(
'phpunit_test_end_after'
,
array
(
Mage
::
dispatchEvent
(
'phpunit_test_end_after'
,
array
(
...
...
app/code/community/EcomDev/PHPUnit/etc/config.xml
View file @
01d53b80
...
@@ -114,6 +114,37 @@
...
@@ -114,6 +114,37 @@
<catalog_product>
ecomdev_phpunit/fixture_eav_catalog_product
</catalog_product>
<catalog_product>
ecomdev_phpunit/fixture_eav_catalog_product
</catalog_product>
<catalog_category>
ecomdev_phpunit/fixture_eav_catalog_category
</catalog_category>
<catalog_category>
ecomdev_phpunit/fixture_eav_catalog_category
</catalog_category>
</eav>
</eav>
<default_data>
<category>
<root>
<entity_id>
1
</entity_id>
<parent_id>
0
</parent_id>
<path>
1
</path>
<position>
0
</position>
<level>
0
</level>
<children_count>
1
</children_count>
<name>
Root Catalog
</name>
<url_key>
root-catalog
</url_key>
<is_active>
1
</is_active>
<is_anchor>
0
</is_anchor>
<attribute_set_id>
0
</attribute_set_id>
</root>
<default_category>
<entity_id>
2
</entity_id>
<parent_id>
1
</parent_id>
<path>
1/2
</path>
<position>
1
</position>
<level>
1
</level>
<children_count>
0
</children_count>
<name>
Default Category
</name>
<url_key>
default-category
</url_key>
<is_active>
1
</is_active>
<is_anchor>
0
</is_anchor>
<display_mode>
PRODUCTS
</display_mode>
<include_in_menu>
1
</include_in_menu>
</default_category>
</category>
</default_data>
</fixture>
</fixture>
<app>
<app>
<!-- Application class name for running tests -->
<!-- Application class name for running tests -->
...
...
lib/EcomDev/PHPUnit/Mock/Proxy.php
View file @
01d53b80
...
@@ -29,6 +29,26 @@ class EcomDev_PHPUnit_Mock_Proxy
...
@@ -29,6 +29,26 @@ class EcomDev_PHPUnit_Mock_Proxy
{
{
protected
$mockInstance
;
protected
$mockInstance
;
/**
* Original mocked class alias
*
* @var string
*/
protected
$classAlias
;
/**
* Added class alias as property
*
* @param PHPUnit_Framework_TestCase $testCase
* @param array|string $type
* @param null $classAlias
*/
public
function
__construct
(
PHPUnit_Framework_TestCase
$testCase
,
$type
,
$classAlias
=
null
)
{
parent
::
__construct
(
$testCase
,
$type
);
$this
->
classAlias
=
$classAlias
;
}
/**
/**
* Adds method name to a mock builder
* Adds method name to a mock builder
*
*
...
@@ -113,6 +133,18 @@ class EcomDev_PHPUnit_Mock_Proxy
...
@@ -113,6 +133,18 @@ class EcomDev_PHPUnit_Mock_Proxy
return
$this
->
getMockInstance
()
->
expects
(
$matcher
);
return
$this
->
getMockInstance
()
->
expects
(
$matcher
);
}
}
/**
* Invokes replaceByMock test util method with current mock object proxy instance
*
* @param $type
* @return $this
*/
public
function
replaceByMock
(
$type
)
{
EcomDev_PHPUnit_Test_Case_Util
::
replaceByMock
(
$type
,
$this
->
classAlias
,
$this
);
return
$this
;
}
/**
/**
* Returns invocation mocker for
* Returns invocation mocker for
*
*
...
...
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