Open hs2323 opened 8 years ago
The MinkBundle (project you've reporting this issue in) is for Behat.
As for PHPUnit yes, you have some options when you start using https://github.com/minkphp/phpunit-mink for integration with Mink. It provides base test case class called BrowserTestCase
that have ability to specify:
When specifying a browser you can use any supported drivers (e.g. Selenium, Zombie, etc.).
This example from the docs explains that in detail: http://phpunit-mink.readthedocs.org/en/latest/getting-started.html
@aik099 no. MinkBundle is not for Behat (https://github.com/Behat/MinkExtension/ is). MinkBundle is for configuring Mink inside the Symfony DIC, to be used in a phpunit testsuite later (by taking it from the kernel of a KernelTestCase). In my opinion, this bundle was a total mistake (at that time, the integration of Behat and Symfony2 was also using a bundle to bring Behat into Symfony instead of bring Symfony into Behat, but BehatBundle is unmaintained since a long time).
So my own recommendation would be to stop using this bundle entirely, in favor of the proper integration (phpunit-mink in this case)
/cc @minkphp/minkbundle
Easy to be confused because just by the name MinkBundle
and MinkExtension
are similar. Before they were even in same organization (even more confusion).
Maybe we can do this:
MinkBundle
README specify, that please use PHPUnit-Mink insteadcomposer.json
I currently have this working with the Selenium driver. When I explicitly set the browser_name in the config_test.yml, it works. It seems I can only pass it one browser/selenium location/etc. Is there any way to have this so when I run PHPUnit from the command line, it can test multiple browsers at once (not necessarily in parallel) and potentially multiple Selenium instances? I know it is possible to do this in the PHPUnit-Selenium library by setting multiple browser parameters in a phpunit.xml file: