-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Downloadable] Cover the Observer SetHasDownloadableProductsObserver by Unit Test #26059
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
[Downloadable] Cover the Observer SetHasDownloadableProductsObserver by Unit Test #26059
Conversation
Hi @edenduong. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Hi @kalpmehta, thank you for the review. |
✔️ QA Passed |
$productType = DownloadableProductType::TYPE_DOWNLOADABLE, | ||
$realProductType = DownloadableProductType::TYPE_DOWNLOADABLE, |
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 see that you always test with the same value for productType and
realProductType`.
In that specific case, it's against YAGNI :-)
Removing the redundant argument, you'll also get side effect of cleaner DataProvider method (oneliners)
…uctsObserver by Unit Test #26059
Hi @edenduong, thank you for your contribution! |
Description (*)
Cover the Observer SetHasDownloadableProductsObserver by Unit Test
Session has downloadable products
Session has no downloadable product
Fixed Issues (if relevant)
Manual testing scenarios (*)
vendor/bin/phpunit app/code/Magento/Downloadable/Test/Unit/Observer/SetHasDownloadableProductsObserverTest.php
Questions or comments
Contribution checklist (*)