Open jon-acker opened 9 years ago
The inspection completed: No new issues
This looks great.
I suspect Driver/MageApp.php
might be useful in other contexts - have you considered a separate lib?
@ciaranmcnulty didn't consider a separate lib because couldn't imagine other contexts, give me an example.
e.g using with StackPHP.
It would be useful to use the CORS middleware for Mage, for example.
This is an attempt to integrate magento more directly, similarly to the way the Symfony2 driver does with symfony. It adds a new driver definition called "magento" and it can be used in place of goutte, e.g. in the behat.yml file you would have:
From my initial tests, with a basic magento installation, this works, although it doesn't seem to work with all magento installations I've tried (perhaps differences with Enterprise version etc.)
The main point is, for scenarios that do not require javascript (i.e. those that currently use only the mink:goutte driver) this can speed up execution by 70-80%! (because we'd not making a real HTTP request)
I've included a sample context for creating an admin user, although this should clearly form part of the behat-mage core, its here for demo purposes.