Commit cdc21297 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

Fix issue with current store code

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