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