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

Remove ObjectManager parameters in static constructor methods #54

Closed schmengler closed 4 years ago

schmengler commented 4 years ago

This declutters the code a bit.

The hard dependency to \Magento\TestFramework\Helper\Bootstrap::getObjectManager() is fine, it's going to be used anyways 99.9999% of the time. And if it ever needs to be replaced, there is still the possibility to use \Magento\TestFramework\Helper\Bootstrap::setObjectManager()

BC break:

\TddWizard\Fixtures\Customer\AddressBuilder::anAddress() has a locale parameter after the ObjectManager parameter. Usages will need to change.