Skip to content

Commit 2e6976c

Browse files
committed
Fixed broken builds for GitHub issue #167
1 parent 74465a8 commit 2e6976c

File tree

4 files changed

+4
-44
lines changed

4 files changed

+4
-44
lines changed

app/code/Magento/InventoryApi/Test/_files/products_simple.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/code/Magento/InventoryApi/Test/_files/products_simple_rollback.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/code/Magento/InventoryCatalog/Plugin/Model/UpdateLegacyCatalogInventoryPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UpdateLegacyCatalogInventoryPlugin
3232
/**
3333
* @var \Magento\CatalogInventory\Api\StockRegistryInterface
3434
*/
35-
protected $stockRegistry;
35+
private $stockRegistry;
3636

3737
/**
3838
* @param ResourceConnection $resourceConnection

app/code/Magento/InventoryCatalog/Test/Integration/UpdateLegacyCatalogInventoryPluginTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Magento\CatalogInventory\Api\Data\StockItemInterface;
2020
use Magento\InventoryApi\Api\GetProductQuantityInStockInterface;
2121
use Magento\Indexer\Model\Indexer;
22-
use Magento\Inventory\Indexer\StockItemIndexerInterface;
22+
use Magento\Inventory\Indexer\SourceItem\SourceItemIndexer;
2323

2424
class UpdateLegacyCatalogInventoryPluginTest extends TestCase
2525
{
@@ -66,7 +66,7 @@ protected function setUp()
6666
$this->stockItemCriteriaFactory = Bootstrap::getObjectManager()->get(StockItemCriteriaInterfaceFactory::class);
6767

6868
$this->indexer = Bootstrap::getObjectManager()->get(Indexer::class);
69-
$this->indexer->load(StockItemIndexerInterface::INDEXER_ID);
69+
$this->indexer->load(SourceItemIndexer::INDEXER_ID);
7070
$this->getProductQtyInStock = Bootstrap::getObjectManager()->get(GetProductQuantityInStockInterface::class);
7171
$this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
7272
}
@@ -146,6 +146,7 @@ public function testThatReservationPlacedUpdatesBothOldAndNewStocks()
146146
$oldStockItem = current($collectionAfterChange->getItems());
147147
$quantityAfterCheck = $oldStockItem->getQty();
148148

149+
$this->assertEquals(8.5 - 5, $this->getProductQtyInStock->execute('SKU-1', 10));
149150
$this->assertEquals($this->getProductQtyInStock->execute('SKU-1', 10), $quantityAfterCheck);
150151
}
151152
}

0 commit comments

Comments
 (0)