We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 6decd776 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

! Fix Issue #18 : compatibility with Magento 1.6.x and higher. Were problem...

! Fix Issue #18 : compatibility with Magento 1.6.x and higher. Were problem with PK autoincrement fields
parent b0fd8e25
......@@ -803,11 +803,11 @@ class EcomDev_PHPUnit_Model_Fixture
$scopeModel = Mage::getModel(self::$_scopeModelByType[$type]);
$scopeModel->setData($row);
// Change property for saving new objects with specified ids
EcomDev_Utils_Reflection::setRestrictedPropertyValues(
$scopeModel->getResource(),
array(
'_useIsObjectNew' => true,
'_isPkAutoIncrement' => false
)
);
......@@ -818,7 +818,6 @@ class EcomDev_PHPUnit_Model_Fixture
EcomDev_Utils_Reflection::setRestrictedPropertyValues(
$scopeModel->getResource(),
array(
'_useIsObjectNew' => false,
'_isPkAutoIncrement' => true
)
);
......@@ -884,4 +883,5 @@ class EcomDev_PHPUnit_Model_Fixture
Mage::app()->reinitStores();
return $this;
}
}
......@@ -597,7 +597,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
*
* @param string $type
* @param string $classAlias
* @param array $methods
* @param array|null $methods
* @param boolean $isAbstract
* @param array $constructorArguments
* @param string $mockClassAlias
......@@ -606,7 +606,7 @@ abstract class EcomDev_PHPUnit_Test_Case extends PHPUnit_Framework_TestCase
* @param boolean $callAutoload
* @return PHPUnit_Framework_MockObject_MockObject
*/
public function getGroupedClassMock($type, $classAlias, array $methods = array(), $isAbstract = false,
public function getGroupedClassMock($type, $classAlias, $methods = array(), $isAbstract = false,
array $constructorArguments = array(),
$mockClassAlias = '', $callOriginalConstructor = true,
$callOriginalClone = true, $callAutoload = true)
......
......@@ -24,6 +24,7 @@
<directory suffix=".php">app/code/community/EcomDev/PHPUnit</directory>
<directory suffix=".php">lib/EcomDev/Utils</directory>
<directory suffix=".php">lib/EcomDev/PHPUnit</directory>
<directory suffix=".php">lib/Spyc</directory>
<!-- Exclude Mage.php file from code coverage -->
<file>app/Mage.php</file>
<!-- Exclude template files -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment