Skip to content

Commit f05fc0c

Browse files
author
Roman Ganin
committed
MAGETWO-33403: Fix integration test for performance toolkit
1 parent 6e04e86 commit f05fc0c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

dev/tests/integration/testsuite/Magento/ToolkitFramework/ApplicationTest.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,24 @@ public static function setUpBeforeClass()
3535

3636
public function testTest()
3737
{
38-
$fixturesArray = \Magento\ToolkitFramework\FixtureSet::getInstance()->getFixtures();
38+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
39+
$objectManager->get('Magento\Framework\App\State')
40+
->setAreaCode(\Magento\ToolkitFramework\Application::AREA_CODE);
41+
3942
$config = \Magento\ToolkitFramework\Config::getInstance();
40-
$config->loadConfig(self::$_generatorWorkingDir . '/profiles/small.xml');
43+
$config->loadConfig(self::$_generatorWorkingDir . '/profiles/ce/small.xml');
44+
/** @var \Magento\TestFramework\Application $itfApplication */
45+
$itfApplication = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getBootstrap()->getApplication();
46+
$installDir = $itfApplication->getTempDir();
47+
$magentoBaseDir = realpath("{$installDir}/../../../../../");
48+
$shell = $this->getMock('Magento\Framework\Shell', [], [], '', false);
49+
4150

42-
foreach ($fixturesArray as $fixture) {
43-
$this->applyFixture(self::$_generatorWorkingDir . '/fixtures/' . $fixture['file']);
51+
$application = new \Magento\ToolkitFramework\Application($magentoBaseDir, $shell);
52+
$application->bootstrap();
53+
foreach ($application->loadFixtures()->getFixtures() as $fixture) {
54+
echo $fixture->getActionTitle() . '... ' . PHP_EOL;
55+
$fixture->execute();
4456
}
4557
}
4658

0 commit comments

Comments
 (0)