Skip to content

Conversation

eduard13
Copy link
Contributor

Description

This PR adds an unit test for \Magento\Checkout\Model\Cart\CollectQuote class.

Fixed Issues (if relevant)

N/A

Manual testing scenarios

N/A

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Component: Checkout labels Jun 20, 2018
@magento-engcom-team
Copy link
Contributor

Hi @eduard13. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on Pull Request changes
  • @magento-engcom-team give me new test instance - deploy NEW test instance based on Pull Request changes
  • @magento-engcom-team give me {$VERSION} instance - deploy Vanilla Magento instance for Issue or Pull Request

For more details, please, review the Magento Contributor Assistant documentation

@eduard13 eduard13 requested a review from rogyar June 20, 2018 13:40
@eduard13 eduard13 self-assigned this Jun 20, 2018
@rogyar rogyar assigned rogyar and unassigned eduard13 Jun 20, 2018
);
$this->addressRepositoryMock = $this->createMock(AddressRepositoryInterface::class);
$this->estimateAddressMock = $this->createMock(EstimateAddressInterface::class);
$this->estimateAddressFactoryMock = $this->getMockBuilder(EstimateAddressInterfaceFactory::class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify this part of the code by using createPartialMock instead of the chain with disableOriginalConstructor and other methods.

@rogyar
Copy link
Contributor

rogyar commented Jul 5, 2018

Hi @eduard13. Thank you for your contribution. Please, make the minor improvements mentioned in the review.
Also, in the future, I would recommend using with() in the mock expectation chain to make the stub's assertion more strict (

->with(\Magento\Customer\Model\Context::CONTEXT_GROUP)
).

@eduard13
Copy link
Contributor Author

eduard13 commented Jul 9, 2018

Hi @rogyar, thank you for suggestions, I've updated the Unit Test regarding your recommendations.

@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-2255 has been created to process this Pull Request

@magento-engcom-team magento-engcom-team merged commit 7f70a6f into magento:2.2-develop Jul 13, 2018
@magento-engcom-team
Copy link
Contributor

Hi @eduard13. Thank you for your contribution.
We will aim to release these changes as part of 2.2.6.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Checkout Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants