Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behat 3 #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

behat 3 #13

wants to merge 9 commits into from

Conversation

MichaelKubovic
Copy link

Hi, I've updated this extension for the latest Behat. Please have a look if this is something you'd like to merge.

@stof
Copy link
Member

stof commented Nov 8, 2016

The branch-alias in the composer.json needs to be bumped to 2.0.x-dev, because this is a BC break for the extension itself (which is fine, as long as we advocate it properly)


namespace Behat\YiiExtension\Context;

class YiiContext implements YiiAwareContextInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, we don't need this base class. Implementing the setter is easy enough

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep that class. Anybody who wants to integrate this context to his feature contexts should imo use hooks, i.e. BeforeScenario. Having the class ready for integration seems natural.


$extensions = $container->getParameter('behat.extension.classes');
// echo json_encode($container->getParameterBag()->all()); exit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be removed


$basePath = $container->getParameter('paths.base');

$extensions = $container->getParameter('extensions');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is used by the WUnitDriver registration, but the way it is done currently is wrong for MinkExtension 2. Registering a session is the wrong way. It should register a driver factory instead (look at the Symfony2Extension for an example)

@@ -76,7 +85,7 @@ public function load(array $config, ContainerBuilder $container)
*
* @param ArrayNodeDefinition $builder
*/
public function getConfig(ArrayNodeDefinition $builder)
public function configure(ArrayNodeDefinition $builder)
{
$boolFilter = function ($v) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bool filter is really weird to me

@stof
Copy link
Member

stof commented Nov 8, 2016

This extension is alos registering the WUnitDriver for Mink, which has been marked as unmaintained (the WUnit implementation itself looked unmaintained last time I checked, and not even compatible with composer properly). Are you using it or no ?

@MichaelKubovic
Copy link
Author

Not using wunit at all, removed it from package + updated readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants