Commit a2a03e03 authored by johnholden's avatar johnholden

Really truly clear config cache on discard fixtures

We found that config fixtures are still retained in memory between tests. This fixed that.
parent 1cd444fe
...@@ -139,6 +139,19 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Config ...@@ -139,6 +139,19 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Config
{ {
Mage::getConfig()->loadScopeSnapshot(); Mage::getConfig()->loadScopeSnapshot();
Mage::getConfig()->loadDb(); Mage::getConfig()->loadDb();
// Flush website and store configuration caches
foreach (Mage::app()->getWebsites(true) as $website) {
EcomDev_Utils_Reflection::setRestrictedPropertyValue(
$website, '_configCache', array()
);
}
foreach (Mage::app()->getStores(true) as $store) {
EcomDev_Utils_Reflection::setRestrictedPropertyValue(
$store, '_configCache', array()
);
}
return $this; return $this;
} }
...@@ -165,4 +178,4 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Config ...@@ -165,4 +178,4 @@ class EcomDev_PHPUnit_Model_Fixture_Processor_Config
} }
} }
\ No newline at end of file
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