Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 4709276

Browse files
author
Oleksii Korshenko
committed
MAGETWO-82003: Ensure database is cleared/Magento reinstalled when TESTS_CLEANUP is enabled #11499
1 parent 67443d1 commit 4709276

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/WebApiApplication.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ public function run()
2525

2626
/**
2727
* {@inheritdoc}
28-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2928
*/
3029
public function install($cleanup)
3130
{
31+
if ($cleanup) {
32+
$this->cleanup();
33+
}
34+
3235
$installOptions = $this->getInstallConfig();
3336

3437
/* Install application */

dev/tests/api-functional/framework/bootstrap.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@
5858
);
5959

6060
if (defined('TESTS_MAGENTO_INSTALLATION') && TESTS_MAGENTO_INSTALLATION === 'enabled') {
61-
if (defined('TESTS_CLEANUP') && TESTS_CLEANUP === 'enabled') {
62-
$application->cleanup();
63-
}
64-
$application->install();
61+
$cleanup = (defined('TESTS_CLEANUP') && TESTS_CLEANUP === 'enabled');
62+
$application->install($cleanup);
6563
}
6664

6765
$bootstrap = new \Magento\TestFramework\Bootstrap(

0 commit comments

Comments
 (0)