-
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
magento/magento2#: Unit test for \Magento\Bundle\Observer\AppendUpsellProductsObserver #26429
magento/magento2#: Unit test for \Magento\Bundle\Observer\AppendUpsellProductsObserver #26429
Conversation
Hi @atwixfirster. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
Great job! Only choose more explanatory name for first test and we are done!
/** | ||
* Test observer execute method | ||
*/ | ||
public function testExecute() |
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.
Rename to reflect what is given and what are the assertions.
Eg. "testExecuteForXLoadsCollectionOnce"
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.
sure :)
Thanks, @lbajsarowicz
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.
done
$parentIds = [1]; | ||
$limit = 2; | ||
$productId = 2; | ||
$typeId = 'simple'; |
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 refer to const from Magento Core
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.
done
b04a112
to
d42d8fb
Compare
Suggestions have been implemented. Could you please review guys? Many thanks! |
Hi @lbajsarowicz, thank you for the review.
|
@atwixfirster Could you fix failed static tests? |
…lProductsObserver
d42d8fb
to
c103950
Compare
fixed Thanks for notice, @engcom-Alfa 👍 |
…dUpsellProductsObserverTest
Hi @dmytro-ch, thank you for the review. |
Don't worry about Functional Tests - Fix will be merged soon to |
Thank you for notice, @lbajsarowicz 🙇 |
✔️ QA Passed |
failed Functional Tests B2B Not related to the changes in this PR |
…r\AppendUpsellProductsObserver #26429
Hi @atwixfirster, thank you for your contribution! |
Description (*)
PR adds a unit test which cover
\Magento\Bundle\Observer\AppendUpsellProductsObserver
class.Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Thank you!