Conversation
…n-to-stockItem-table
…agento-engcom/magento2 into msi-add-reservation-to-stockItem-table
|
Hey, @sinisa86 could you please merge latest develop branch into Looks like there could be issues after latest develop merged. Just merged develop by myself and run tests. Will see results soon |
| $oldStockItem = current($collectionAfterChange->getItems()); | ||
| $quantityAfterCheck = $oldStockItem->getQty(); | ||
|
|
||
| $this->assertEquals($this->getProductQtyInStock->execute('SKU-1', 10), $quantityAfterCheck); |
There was a problem hiding this comment.
also, you need to add one more assert that both these value equal to 8.5 - 5
because your case will work even if Reservation did not affect both of the Inventory data and they stayed the same
| /** | ||
| * @var \Magento\CatalogInventory\Api\StockRegistryInterface | ||
| */ | ||
| protected $stockRegistry; |
There was a problem hiding this comment.
stockRegistry should be private
| */ | ||
|
|
||
| /** @var $product \Magento\Catalog\Model\Product */ | ||
| $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() |
There was a problem hiding this comment.
currently, none of the test classes use this fixture.
As you adapted products_simple.php for your purposes
Do we really need it?
| use Magento\CatalogInventory\Api\StockRegistryInterface; | ||
|
|
||
| /** | ||
| * Plugin help to fill the legacy catalog inventory tables cataloginventory_stock_status and |
|
|
||
| /** | ||
| * Plugin help to fill the legacy catalog inventory tables cataloginventory_stock_status and | ||
| * cataloginventory_stock_item to don't break the backward compatible. |
There was a problem hiding this comment.
to don't break the backward compatible. ->
to prevent breaking the backward compatibility
Currently, Work in Progress see #167