Skip to content

Commit c83fd90

Browse files
author
Oleksandr Manchenko
committed
MTA-551: Re-factor Test for Out of Stock Item
- Removed ObjectManager from test
1 parent dd74133 commit c83fd90

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
use Magento\Catalog\Test\Fixture\CatalogProductSimple;
1111
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
1212
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew;
13-
use Magento\Mtf\ObjectManager;
1413
use Magento\Mtf\TestCase\Injectable;
1514

1615
/**
17-
* Test Flow:
16+
* Steps:
1817
* 1. Login to the backend.
1918
* 2. Navigate to Products > Catalog.
2019
* 3. Start to create simple product.
@@ -33,13 +32,6 @@ class CreateSimpleProductEntityTest extends Injectable
3332
const DOMAIN = 'MX';
3433
/* end tags */
3534

36-
/**
37-
* Object Manager.
38-
*
39-
* @var ObjectManager
40-
*/
41-
protected $objectManager;
42-
4335
/**
4436
* Configuration setting.
4537
*
@@ -50,15 +42,13 @@ class CreateSimpleProductEntityTest extends Injectable
5042
/**
5143
* Prepare data.
5244
*
53-
* @param ObjectManager $objectManager
5445
* @param Category $category
5546
* @return array
5647
*/
57-
public function __prepare(ObjectManager $objectManager, Category $category)
48+
public function __prepare(Category $category)
5849
{
59-
$this->objectManager = $objectManager;
60-
6150
$category->persist();
51+
6252
return [
6353
'category' => $category
6454
];

0 commit comments

Comments
 (0)