11
11
use Magento \Catalog \Model \Indexer \Product \Price \Processor as PriceProcessor ;
12
12
use Magento \CatalogInventory \Model \Configuration ;
13
13
use Magento \CatalogInventory \Model \Indexer \Stock \Processor as StockProcessor ;
14
+ use Magento \CatalogInventory \Model \ResourceModel \Stock \Item as ItemResource ;
14
15
use Magento \CatalogInventory \Model \Stock ;
15
16
use Magento \CatalogInventory \Model \StockRegistryStorage ;
16
17
use Magento \Framework \App \Config \MutableScopeConfigInterface ;
@@ -34,7 +35,7 @@ class ItemTest extends TestCase
34
35
/** @var MutableScopeConfigInterface */
35
36
private $ mutableConfig ;
36
37
37
- /** @var Item */
38
+ /** @var ItemResource */
38
39
private $ stockItemResource ;
39
40
40
41
/** @var StoreManagerInterface */
@@ -57,9 +58,11 @@ class ItemTest extends TestCase
57
58
*/
58
59
protected function setUp (): void
59
60
{
61
+ parent ::setUp ();
62
+
60
63
$ this ->objectManager = Bootstrap::getObjectManager ();
61
64
$ this ->mutableConfig = $ this ->objectManager ->get (MutableScopeConfigInterface::class);
62
- $ this ->stockItemResource = $ this ->objectManager ->get (Item ::class);
65
+ $ this ->stockItemResource = $ this ->objectManager ->get (ItemResource ::class);
63
66
$ this ->storeManager = $ this ->objectManager ->get (StoreManagerInterface::class);
64
67
$ this ->productRepository = $ this ->objectManager ->get (ProductRepositoryInterface::class);
65
68
$ this ->productRepository ->cleanCache ();
@@ -72,11 +75,11 @@ protected function setUp(): void
72
75
* @dataProvider updateSetOutOfStockDataProvider
73
76
* @magentoDataFixture Magento/Catalog/_files/product_simple_duplicated.php
74
77
* @magentoDataFixture Magento/Catalog/_files/product_simple_backorders_no.php
75
- * @magentoConfigFixture default_store cataloginventory/item_options/min_qty 105
76
- * @magentoConfigFixture default_store cataloginventory/item_options/manage_stock 1
78
+ * @magentoConfigFixture current_store cataloginventory/item_options/min_qty 105
79
+ * @magentoConfigFixture current_store cataloginventory/item_options/manage_stock 1
80
+ * @magentoDbIsolation disabled
77
81
* @param int $backorders
78
82
* @param array $expectedStockItems
79
- * @magentoDbIsolation disabled
80
83
* @return void
81
84
*/
82
85
public function testUpdateSetOutOfStock (int $ backorders , array $ expectedStockItems ): void
@@ -131,10 +134,10 @@ public function updateSetOutOfStockDataProvider(): array
131
134
* @dataProvider updateUpdateSetInStockDataProvider
132
135
* @magentoDataFixture Magento/Catalog/_files/out_of_stock_product_with_category.php
133
136
* @magentoDataFixture Magento/Catalog/_files/product_simple_out_of_stock.php
134
- * @magentoConfigFixture default_store cataloginventory/item_options/min_qty 50
137
+ * @magentoConfigFixture current_store cataloginventory/item_options/min_qty 50
138
+ * @magentoDbIsolation disabled
135
139
* @param int $manageStock
136
140
* @param array $expectedStockItems
137
- * @magentoDbIsolation disabled
138
141
* @return void
139
142
*/
140
143
public function testUpdateSetInStock (int $ manageStock , array $ expectedStockItems ): void
0 commit comments