Skip to content

Magento_Sales integration tests: Fix addresses in order_list fixture - #16351

Merged
magento-engcom-team merged 5 commits into
magento:2.3-developfrom
evktalo:fix-order_list-set-billing-address-twice
Sep 26, 2018
Merged

magento-engcom-team merged 5 commits into
magento:2.3-developfrom
evktalo:fix-order_list-set-billing-address-twice

Conversation

@evktalo

@evktalo evktalo commented Jun 22, 2018 •

Copy link
Copy Markdown
Contributor

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

  1. Create an integration test that uses order_list fixture
  2. Create order in the test
  3. Call $order->getShipppingAddress()->getFirstname()

Without the fix, you will get a 'Call to a member function on null' error.

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

Copy link
Copy Markdown
Contributor

Hi @evktalo. 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 PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

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

@evktalo evktalo changed the title Magento_Sales integration tests: Fix order list set billing address twice Magento_Sales integration tests: Fix addresses in order_list fixture Jun 23, 2018
@magento-engcom-team magento-engcom-team added this to the Release: 2.3.0 milestone Jul 10, 2018
… module tests

 - Use the order repository for saving,
 - Use guest customer,
 - Attach email address to order,
Comment thread dev/tests/integration/testsuite/Magento/Sales/_files/order_list.php
@magento-engcom-team

Copy link
Copy Markdown
Contributor

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

@magento-engcom-team

Copy link
Copy Markdown
Contributor

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

@evktalo
evktalo deleted the fix-order_list-set-billing-address-twice branch March 12, 2019 10:29
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
…list fixture magento#16351

 - Merge Pull Request magento#16351 from evktalo/magento2:fix-order_list-set-billing-address-twice
 - Merged commits:
   1. e746480
   2. 1481591
   3. cb578e7
   4. ad35b6f
   5. 214ba67
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
Accepted Public Pull Requests:
 - magento#18207: [Forwardport] Make sure all linked products (related, upsells, crosss� (by @hostep)
 - magento#18205: [Forwardport] Fix module uninstall shell command and composer removal w/out regression (by @mage2pratik)
 - magento#18122: Update db schema comments (by @hryvinskyi)
 - magento#18211: [Forwardport] [CatalogUrlRewrite] Covering the CategoryProcessUrlRewriteMovingObserver by Unit Test (by @eduard13)
 - magento#18198: [Forwardport] [remove] rich snippet declaration on grouped product (by @AurelienLavorel)
 - magento#18202: [Forwardport] Current password autocomplete for admin login (by @mage2pratik)
 - magento#18203: [Forwardport] [2.2] return $this from setters in Analytics/ReportXml/DB/SelectBuilder.php (by @mage2pratik)
 - magento#18187: Replace sort callbacks to spaceship operator in vendor files (by @mage2pratik)
 - magento#17685: Replacing deprecated methods from Magento_Backend module. (by @tiagosampaio)
 - magento#18141: [Forwardport] Update time12h javascript validation rule to be compatible with js minify (by @mage2pratik)
 - magento-engcom/magento2ce#2159: magento#18009: [Forwardport] Cannot create a numeric value attribute option using the REST API. (by @p-bystritsky)
 - magento#16351: Magento_Sales integration tests: Fix addresses in order_list fixture (by @evktalo)


Fixed GitHub Issues:
 - magento#13720: Only 2 related products are showing in backend . (reported by @dipind4u) has been fixed in magento#18207 by @hostep in 2.3-develop branch
   Related commits:
     1. 74e1ea9
     2. d5b6231

 - magento#14050: Import related products issue (reported by @estellehuang) has been fixed in magento#18207 by @hostep in 2.3-develop branch
   Related commits:
     1. 74e1ea9
     2. d5b6231

 - magento#5797: [2.1.0] module:uninstall can remove code it uses itself (reported by @hostep) has been fixed in magento#18205 by @mage2pratik in 2.3-develop branch
   Related commits:
     1. 8b9fff5
     2. fa4289f

 - magento#17780: Module uninstall does not work with composer (reported by @Thundar) has been fixed in magento#18205 by @mage2pratik in 2.3-develop branch
   Related commits:
     1. 8b9fff5
     2. fa4289f

 - magento#18009: Cannot create a numeric value attribute option using the REST API (reported by @sidm) has been fixed in magento-engcom/magento2ce#2159 by @p-bystritsky in 2.3-develop branch
   Related commits:
     1. 3b9e963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants