tddwizard / magento2-fixtures

Fixture library for Magento 2 integration tests by @schmengler (@integer-net)
http://tddwizard.com/
MIT License
141 stars 28 forks source link

Fix building addresses with province #42

Closed mam08ixo closed 4 years ago

mam08ixo commented 4 years ago

Region ID is not properly determined when the Faker address has a province property (instead of the more common state).

For CA addresses, the QuoteValidator then throws a LocalizedException when using the OrderBuilder:

Please check the shipping address information. "regionId" is required. Enter and try again.

This change attempts to read province first and falls back to state if the former is not set.

Note: This builds upon #41 and has to be merged thereafter.

schmengler commented 4 years ago

Thank you!