Skip to content

Commit cdc2129

Browse files
committed
Fix issue with current store code
1 parent f4397a1 commit cdc2129

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

app/code/community/EcomDev/PHPUnit/Test/Case/Util.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ public static function getGroupedClassMockBuilder(PHPUnit_Framework_TestCase $te
511511
public static function setUp()
512512
{
513513
self::app()->resetDispatchedEvents();
514+
self::$originalStore = Mage::app()->getStore()->getCode();
514515
}
515516

516517
/**

app/code/community/EcomDev/PHPUnit/Test/Listener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,16 @@ public function endTest(PHPUnit_Framework_Test $test, $time)
173173
));
174174

175175
if ($test instanceof PHPUnit_Framework_TestCase) {
176+
EcomDev_PHPUnit_Helper::tearDown();
177+
EcomDev_PHPUnit_Test_Case_Util::tearDown();
178+
176179
EcomDev_PHPUnit_Test_Case_Util::getFixture(get_class($test))
177180
->setScope(EcomDev_PHPUnit_Model_FixtureInterface::SCOPE_LOCAL)
178181
->discard(); // Clear applied fixture
179182

180183
if (EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->isLoaded()) {
181184
EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->discard();
182185
}
183-
184-
EcomDev_PHPUnit_Test_Case_Util::tearDown();
185-
EcomDev_PHPUnit_Helper::tearDown();
186186
}
187187

188188
Mage::dispatchEvent('phpunit_test_end_after', array(

0 commit comments

Comments
 (0)