-
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_Sales integration tests: Fix addresses in order_list fixture #16351
Magento_Sales integration tests: Fix addresses in order_list fixture #16351
Conversation
Hi @evktalo. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
…. Additionally, improve code style slightly.
… module tests - Use the order repository for saving, - Use guest customer, - Attach email address to order,
…s against the order
Hi @dmanners, thank you for the review. |
Hi @evktalo. Thank you for your contribution. |
Description
Addresses are broken in the order_list.php integration test fixture.
Instead of setting billing address twice, set both billing address and shipping address.
Reset $billingAddress and $shippingAddress variables with newly created Address objects. Otherwise trying to access the order's address data gives an error. (e.g. 'Call to a member function on null' when trying to use $order->getBillingAddress()->getFirstname())
Additionally, improve code style slightly.
I don't think this affects the present integration tests that use this fixture, but when you try to use this fixture in a test that does use the addresses, it will not work.
Fixed Issues (if relevant)
None.
Manual testing scenarios
Without the fix, you will get a 'Call to a member function on null' error.
Contribution checklist