Skip to content

Commit 77a9441

Browse files
committed
MTA-1284: Implement mechanism of cleaning up all data after scenario execution
- CR Changes
1 parent 82e65b6 commit 77a9441

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Magento\Catalog\Test\TestStep;
88

9-
use Magento\Mtf\ObjectManager;
10-
use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
119
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew;
1210
use Magento\Mtf\TestStep\TestStepInterface;
1311

@@ -24,21 +22,21 @@ class SaveAttributeStep implements TestStepInterface
2422
protected $attributeNew;
2523

2624
/**
27-
* CatalogProductAttribute fixture.
25+
* Delete attribute step.
2826
*
29-
* @var CatalogProductAttribute
27+
* @var DeleteAttributeStep
3028
*/
31-
protected $attribute;
29+
protected $deleteAttribute;
3230

3331
/**
3432
* @constructor
3533
* @param CatalogProductAttributeNew $attributeNew
36-
* @param CatalogProductAttribute $attribute
34+
* @param DeleteAttributeStep $deleteAttribute
3735
*/
38-
public function __construct(CatalogProductAttributeNew $attributeNew, CatalogProductAttribute $attribute)
36+
public function __construct(CatalogProductAttributeNew $attributeNew, DeleteAttributeStep $deleteAttribute)
3937
{
4038
$this->attributeNew = $attributeNew;
41-
$this->attribute = $attribute;
39+
$this->deleteAttribute = $deleteAttribute;
4240
}
4341

4442
/**
@@ -58,9 +56,6 @@ public function run()
5856
*/
5957
public function cleanup()
6058
{
61-
ObjectManager::getInstance()->create(
62-
'Magento\Catalog\Test\TestStep\DeleteAttributeStep',
63-
['attribute' => $this->attribute]
64-
)->run();
59+
$this->deleteAttribute->run();
6560
}
6661
}

dev/tests/functional/tests/app/Magento/Config/Test/TestStep/SetupConfigurationStep.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public function run()
7777
}
7878

7979
/**
80+
* Rollback configuration.
81+
*
8082
* @return void
8183
*/
8284
public function cleanup()

0 commit comments

Comments
 (0)