Commit 1e69dbad authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

Fix issue with current store code

parent 11a82d76
......@@ -511,6 +511,7 @@ class EcomDev_PHPUnit_Test_Case_Util
public static function setUp()
{
self::app()->resetDispatchedEvents();
self::$originalStore = Mage::app()->getStore()->getCode();
}
/**
......
......@@ -173,6 +173,9 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
));
if ($test instanceof PHPUnit_Framework_TestCase) {
EcomDev_PHPUnit_Helper::tearDown();
EcomDev_PHPUnit_Test_Case_Util::tearDown();
EcomDev_PHPUnit_Test_Case_Util::getFixture(get_class($test))
->setScope(EcomDev_PHPUnit_Model_FixtureInterface::SCOPE_LOCAL)
->discard(); // Clear applied fixture
......@@ -180,9 +183,6 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
if (EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->isLoaded()) {
EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->discard();
}
EcomDev_PHPUnit_Test_Case_Util::tearDown();
EcomDev_PHPUnit_Helper::tearDown();
}
Mage::dispatchEvent('phpunit_test_end_after', array(
......
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