-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Msrp] Cover MsrpPriceCalculator by Unit Test #26067
[Msrp] Cover MsrpPriceCalculator by Unit Test #26067
Conversation
Hi @edenduong. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
namespace Magento\Msrp\Test\Unit\Pricing; | ||
|
||
use Magento\Catalog\Model\Product; | ||
use Magento\Catalog\Model\Product\Type as Type; |
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.
I'm not sure this alias is relevant :)
use Magento\Catalog\Model\Product\Type as Type; | |
use Magento\Catalog\Model\Product\Type as ProductType; |
*/ | ||
public function testGetMsrpPriceValue($msrpPriceCalculators, $productMock, $expected) | ||
{ | ||
$objectManager = new ObjectManager($this); |
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.
Please move the object manager along with testable object initialization to the setUp
method. No need to initialize them for each test case triggered.
Thus, it can be also used in further tests if necessary.
Hi @dmytro-ch: Thank you for your feedback. I have changed the source code. Please check it again. Thanks. |
Notice: QA not applicable |
Hi @edenduong, thank you for your contribution! |
Description (*)
Increase Test Coverage by Cover class Magento\Msrp\Pricing\MsrpPriceCalculator
Fixed Issues (if relevant)
Manual testing scenarios (*)
vendor/bin/phpunit app/code/Magento/Msrp/Test/Unit/Pricing/MsrpPriceCalculatorTest.php
Questions or comments
Contribution checklist (*)