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 81ee78b5 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

! Fixes for controller tests and new @registry annotation for registry keys reset

parent 192d7052
......@@ -31,7 +31,7 @@ class EcomDev_PHPUnit_Controller_Front extends Mage_Core_Controller_Varien_Front
*/
public function init()
{
if ($this->_routers) {;
if ($this->_routers) {
$this->_routers = array();
}
......
......@@ -23,6 +23,7 @@
* @singleton catalog/product_type
* @resource catalog/product
* @helper catalog
* @registry key
*
* or by specifying it in Yaml file:
*
......@@ -55,7 +56,8 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Registry implements EcomDev_PHPUni
$typeToKey = array(
'singleton' => '_singleton/',
'resource' => '_resource_singleton/',
'helper' => '_helper/'
'helper' => '_helper/',
'registry' => ''
);
if ($fixture->getStorageData(self::STORAGE_KEY) !== null) {
......@@ -116,7 +118,7 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Registry implements EcomDev_PHPUni
{
$options = $fixture->getOptions();
$registry = array();
foreach (array('singleton', 'resource', 'helper') as $type) {
foreach (array('singleton', 'resource', 'helper', 'registry') as $type) {
if (!isset($options[$type])) {
continue;
}
......
......@@ -173,6 +173,8 @@ class EcomDev_PHPUnit_Constraint_Config_Layout
$assertion = self::getDesignPackageModel()
->getLayoutFileAssertion($this->_expectedValue, $this->_area, $this->_designPackage, $this->_theme);
$this->setActualValue($assertion['actual']);
$this->_expectedValue = $assertion['expected'];
return $this->compareValues($assertion['expected'], $assertion['actual']);
}
......
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