File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
app/code/Magento/ConfigurableProduct/Model/Inventory
dev/tests/integration/testsuite/Magento/CatalogInventory Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ class ParentItemProcessor implements ParentItemProcessorInterface
40
40
*/
41
41
private $ stockConfiguration ;
42
42
43
+ /**
44
+ * @param Configurable $configurableType
45
+ * @param StockItemCriteriaInterfaceFactory $criteriaInterfaceFactory
46
+ * @param StockItemRepositoryInterface $stockItemRepository
47
+ * @param StockConfigurationInterface $stockConfiguration
48
+ */
43
49
public function __construct (
44
50
Configurable $ configurableType ,
45
51
StockItemCriteriaInterfaceFactory $ criteriaInterfaceFactory ,
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ protected function setUp()
51
51
*
52
52
* @magentoAppArea adminhtml
53
53
* @magentoAppIsolation enabled
54
+ * @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
54
55
* @magentoDataFixture Magento/CatalogInventory/_files/configurable_options_with_low_stock.php
55
56
* @throws NoSuchEntityException
56
57
* @throws InputException
Original file line number Diff line number Diff line change 9
9
use Magento \CatalogInventory \Api \Data \StockItemInterface ;
10
10
use Magento \CatalogInventory \Api \StockItemRepositoryInterface ;
11
11
use Magento \TestFramework \Helper \Bootstrap ;
12
-
13
- require __DIR__ . '/../../../Magento/ConfigurableProduct/_files/product_configurable.php ' ;
12
+ use Magento \Catalog \Api \ProductRepositoryInterface ;
14
13
15
14
$ objectManager = Bootstrap::getObjectManager ();
16
15
16
+ /** @var ProductRepositoryInterface $productRepository */
17
+ $ productRepository = $ objectManager ->create (ProductRepositoryInterface::class);
18
+
17
19
/** @var StockItemRepositoryInterface $stockItemRepository */
18
20
$ stockItemRepository = $ objectManager ->get (StockItemRepositoryInterface::class);
19
21
34
36
$ stockItem ->setIsInStock (false )
35
37
->setQty (0 );
36
38
$ stockItemRepository ->save ($ stockItem );
37
-
You can’t perform that action at this time.
0 commit comments