1111use Magento \Catalog \Model \Indexer \Product \Price \Processor as PriceProcessor ;
1212use Magento \CatalogInventory \Model \Configuration ;
1313use Magento \CatalogInventory \Model \Indexer \Stock \Processor as StockProcessor ;
14+ use Magento \CatalogInventory \Model \ResourceModel \Stock \Item as ItemResource ;
1415use Magento \CatalogInventory \Model \Stock ;
1516use Magento \CatalogInventory \Model \StockRegistryStorage ;
1617use Magento \Framework \App \Config \MutableScopeConfigInterface ;
@@ -34,7 +35,7 @@ class ItemTest extends TestCase
3435 /** @var MutableScopeConfigInterface */
3536 private $ mutableConfig ;
3637
37- /** @var Item */
38+ /** @var ItemResource */
3839 private $ stockItemResource ;
3940
4041 /** @var StoreManagerInterface */
@@ -57,9 +58,11 @@ class ItemTest extends TestCase
5758 */
5859 protected function setUp (): void
5960 {
61+ parent ::setUp ();
62+
6063 $ this ->objectManager = Bootstrap::getObjectManager ();
6164 $ this ->mutableConfig = $ this ->objectManager ->get (MutableScopeConfigInterface::class);
62- $ this ->stockItemResource = $ this ->objectManager ->get (Item ::class);
65+ $ this ->stockItemResource = $ this ->objectManager ->get (ItemResource ::class);
6366 $ this ->storeManager = $ this ->objectManager ->get (StoreManagerInterface::class);
6467 $ this ->productRepository = $ this ->objectManager ->get (ProductRepositoryInterface::class);
6568 $ this ->productRepository ->cleanCache ();
@@ -72,11 +75,11 @@ protected function setUp(): void
7275 * @dataProvider updateSetOutOfStockDataProvider
7376 * @magentoDataFixture Magento/Catalog/_files/product_simple_duplicated.php
7477 * @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
7781 * @param int $backorders
7882 * @param array $expectedStockItems
79- * @magentoDbIsolation disabled
8083 * @return void
8184 */
8285 public function testUpdateSetOutOfStock (int $ backorders , array $ expectedStockItems ): void
@@ -131,10 +134,10 @@ public function updateSetOutOfStockDataProvider(): array
131134 * @dataProvider updateUpdateSetInStockDataProvider
132135 * @magentoDataFixture Magento/Catalog/_files/out_of_stock_product_with_category.php
133136 * @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
135139 * @param int $manageStock
136140 * @param array $expectedStockItems
137- * @magentoDbIsolation disabled
138141 * @return void
139142 */
140143 public function testUpdateSetInStock (int $ manageStock , array $ expectedStockItems ): void
0 commit comments