MageTest / BehatMage

Behat for Magento
MIT License
85 stars 31 forks source link

Expose FixtureFactory in MagentoContext #77

Closed daveherbert closed 9 years ago

daveherbert commented 9 years ago

I discovered an issue using fixtures when extending from MagentoContext. I found I couldn't access the FixtureFactory unless I extended from RawMagentoContext (which has a getFixtureFactory() method) - but that caused problems because it contains all the steps defined in MinkContext, which caused duplication and threw ambiguous exceptions.

My solution to this was to implement getFixtureFactory() in MagentoContext. It seems like this method was omitted originally, as all the other private properties ($app, $configManager, $cacheManager, $sessionService) have getters and setters, but $factory only has a setter, and then getFixture().

I'm not sure whether this omission was intentional or accidental, I think the original intention was to use getFixture() to return these objects, but a change in the FixtureFactory implementation means this no longer works.

scrutinizer-notifier commented 9 years ago

The inspection completed: 5 new issues, 2 updated code elements

jamescowie commented 9 years ago

Thanks pal :+1: