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
Tests for MSI-1580: For configurable reservation after cancel order isn't create #1581
Conversation
…sn't create (integration tests on default stock)
…sn't create (integration tests on not default stock)
use Magento\Catalog\Model\Product\Visibility; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
|
||
Bootstrap::getInstance()->reinitialize(); |
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.
Why do we need reinitialize
? Looks like copy paste
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.
@naydav Without reinitialize
test in scope run are failed. I'm copy it from other test
/** @var $objectManager \Magento\TestFramework\ObjectManager */ | ||
$objectManager = Bootstrap::getObjectManager(); | ||
/** @var ProductRepositoryInterface $productRepository */ | ||
$productRepository = $objectManager->create(ProductRepositoryInterface::class); |
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.
You need to use get
method instead of create
@@ -0,0 +1,50 @@ | |||
<?php |
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.
You can reuse existed fixture (new inventory modules)
use Magento\Catalog\Model\Product\Visibility; | ||
use Magento\GroupedProduct\Model\Product\Type\Grouped; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
use Magento\Store\Model\Website; |
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.
Try to work with API interfaces anywhere if it is possible
@@ -0,0 +1,89 @@ | |||
<?php |
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.
We already have similar fixture (new inventory fixtures)
code review changes to PR should be done, especially regarding test coverage |
Closing this PR for now as it's very outdated and conflicting. |
Description
Get sku for reservation from order item.
Fixed Issues (if relevant)
Contribution checklist