6
6
7
7
namespace Magento \Catalog \Test \TestStep ;
8
8
9
- use Magento \Mtf \ObjectManager ;
10
- use Magento \Catalog \Test \Fixture \CatalogProductAttribute ;
11
9
use Magento \Catalog \Test \Page \Adminhtml \CatalogProductAttributeNew ;
12
10
use Magento \Mtf \TestStep \TestStepInterface ;
13
11
@@ -24,21 +22,21 @@ class SaveAttributeStep implements TestStepInterface
24
22
protected $ attributeNew ;
25
23
26
24
/**
27
- * CatalogProductAttribute fixture .
25
+ * Delete attribute step .
28
26
*
29
- * @var CatalogProductAttribute
27
+ * @var DeleteAttributeStep
30
28
*/
31
- protected $ attribute ;
29
+ protected $ deleteAttribute ;
32
30
33
31
/**
34
32
* @constructor
35
33
* @param CatalogProductAttributeNew $attributeNew
36
- * @param CatalogProductAttribute $attribute
34
+ * @param DeleteAttributeStep $deleteAttribute
37
35
*/
38
- public function __construct (CatalogProductAttributeNew $ attributeNew , CatalogProductAttribute $ attribute )
36
+ public function __construct (CatalogProductAttributeNew $ attributeNew , DeleteAttributeStep $ deleteAttribute )
39
37
{
40
38
$ this ->attributeNew = $ attributeNew ;
41
- $ this ->attribute = $ attribute ;
39
+ $ this ->deleteAttribute = $ deleteAttribute ;
42
40
}
43
41
44
42
/**
@@ -58,9 +56,6 @@ public function run()
58
56
*/
59
57
public function cleanup ()
60
58
{
61
- ObjectManager::getInstance ()->create (
62
- 'Magento\Catalog\Test\TestStep\DeleteAttributeStep ' ,
63
- ['attribute ' => $ this ->attribute ]
64
- )->run ();
59
+ $ this ->deleteAttribute ->run ();
65
60
}
66
61
}
0 commit comments