Skip to content

Commit 7894704

Browse files
committed
DEVOPS-2174: Fix integration tests
1 parent 7957076 commit 7894704

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ protected function _applyOneFixture($fixture)
171171
require $fixture;
172172
}
173173
} catch (\Exception $e) {
174-
throw new \Exception(
175-
sprintf("Error in fixture: %s.\n %s", json_encode($fixture), $e->getMessage()),
174+
throw new \PHPUnit_Framework_Exception(
175+
sprintf("Error in fixture: %s.\n %s\n %s", json_encode($fixture), $e->getMessage(), $e->getTraceAsString()),
176176
500,
177177
$e
178178
);

dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixtureBeforeTransaction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ protected function _applyOneFixture($fixture)
138138
require $fixture;
139139
}
140140
} catch (\Exception $e) {
141-
throw new \Exception(
142-
sprintf("Error in fixture: %s.\n %s", json_encode($fixture), (string)$e)
141+
throw new \PHPUnit_Framework_Exception(
142+
sprintf("Error in fixture: %s.\n %s\n %s", json_encode($fixture), $e->getMessage(), $e->getTraceAsString()),
143+
500,
144+
$e
143145
);
144146
}
145147
}

dev/tests/integration/testsuite/Magento/Customer/Model/GroupManagementTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class GroupManagementTest extends \PHPUnit_Framework_TestCase
1616
{
1717
/**
18-
* @var \Magento\Framework\ObjectManagerInterface
18+
* @var \Magento\TestFramework\ObjectManager
1919
*/
2020
protected $objectManager;
2121

@@ -46,6 +46,9 @@ public function testGetDefaultGroupWithStoreId($testGroup, $storeId)
4646
*/
4747
public function testGetDefaultGroupWithNonDefaultStoreId()
4848
{
49+
$this->objectManager->removeSharedInstance('Magento\TestFramework\App\Config');
50+
$this->objectManager->removeSharedInstance('Magento\Framework\App\Config\ScopeConfigInterface');
51+
4952
/** @var \Magento\Store\Model\StoreManagerInterface $storeManager */
5053
$storeManager = Bootstrap::getObjectManager()->get('Magento\Store\Model\StoreManagerInterface');
5154
$nonDefaultStore = $storeManager->getStore('secondstore');

0 commit comments

Comments
 (0)