Skip to content

Commit 2b22f38

Browse files
committed
Merge pull request EcomDev#226 from johnholden/master
Really truly clear config cache on discard fixtures
2 parents 1cd444f + a2a03e0 commit 2b22f38

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • app/code/community/EcomDev/PHPUnit/Model/Fixture/Processor

app/code/community/EcomDev/PHPUnit/Model/Fixture/Processor/Config.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ protected function _restoreConfig()
139139
{
140140
Mage::getConfig()->loadScopeSnapshot();
141141
Mage::getConfig()->loadDb();
142+
143+
// Flush website and store configuration caches
144+
foreach (Mage::app()->getWebsites(true) as $website) {
145+
EcomDev_Utils_Reflection::setRestrictedPropertyValue(
146+
$website, '_configCache', array()
147+
);
148+
}
149+
foreach (Mage::app()->getStores(true) as $store) {
150+
EcomDev_Utils_Reflection::setRestrictedPropertyValue(
151+
$store, '_configCache', array()
152+
);
153+
}
154+
142155
return $this;
143156
}
144157

@@ -165,4 +178,4 @@ protected function _setConfigNodeValue($path, $value)
165178
}
166179

167180

168-
}
181+
}

0 commit comments

Comments
 (0)