-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSI: Update old StockItem and Stock Status DB table at the time of Reservation appended #170
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stockRegistry should be private
*/ | ||
|
||
/** @var $product \Magento\Catalog\Model\Product */ | ||
$product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helpS
|
||
/** | ||
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to don't break the backward compatible.
->
to prevent breaking the backward compatibility
Currently, Work in Progress see #167