Behat / YiiExtension

Yii framework integration extension for Behat
MIT License
27 stars 8 forks source link

Fully merge of Behat/MinkWUnitDriver #4

Closed patrickdreyer closed 11 years ago

patrickdreyer commented 11 years ago

Looking at Behat/Symfony2Extension, I decided to fully merge the newly created Behat/MinkWUnitDriver into this extension. Now, the mink driver wunit is loaded either if explicitly requested or Behat/MinkExtension and Behat/MinkBrowserKitDriver is available. For using it, one still has to configure the behat.yml properly, setting default_session to wunit.

asm89 commented 11 years ago

I'm not a fan of merging this into the extension itself. You can use Behat + Yii perfectly without the wunit driver. Apart from that we should probably get https://github.com/weavora/wunit to add a composer.json to be installed nicely too (and use sf2 as dep instead of having the code copied into the repository).

ping @everzet

everzet commented 11 years ago

@asm89 we could just ensure that WUnitDriver is not loaded by default into DIC making it totally optional (like Symfony2Driver in Symfony2Extension).

everzet commented 11 years ago

@patrickdreyer after talking with @asm89 on this matter, we still highly interested in your work (don't even try to get us wrong on this one), but we think that this driver should live in the separate repository and there's 2 objective reasons for that:

  1. Driver implies lots of needed dependencies for this extension and we don't want to put this much dependencies to all Behat+Yii users even if they don't use WUnit
  2. Driver could be usable for Yii developers outside of Behat scope. Meaning some Yii developers might find it useful to use Mink directly with WUnit driver in their PHPUnit test suites.

@patrickdreyer what do you think?

patrickdreyer commented 11 years ago

Why merging

However, you guys are the Behat cracks and you need to keep the structure clean ;-) Thus, whatever you think is best, I am happy to do it. But please let me know the detailed structure you are expecting, that said, which file shall go into which repository, including the directory structure - just to prevent ping-pong.

weavora/wunit I absolutely agree, but I don't have time to wait until this is done too, which is why I simply copy&pasted it. Once the WUnit driver stuff is clean and works, I will go ahead having this cleaned up. I already opened an issue that for: https://github.com/weavora/wunit/issues/12

ping to @everzet and @asm89

stof commented 11 years ago

@patrickdreyer Symfony2Extension does not contain the driver. It only extends it to change the constructor to get the client configured by the FrameworkBundle and provides the service configuration. The driver is in MinkBrowserKitDriver.

For me, this PR should be closed and you should do another one providing only the config, with an optional dependency on MinkWUnitDriver (see how it is done in Symfony2Extension)

everzet commented 11 years ago

I agree with @stof