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

New Behat Plugin #5

Open
KashifSaadat opened this issue May 22, 2014 · 7 comments
Open

New Behat Plugin #5

KashifSaadat opened this issue May 22, 2014 · 7 comments

Comments

@KashifSaadat
Copy link

Hey,

I've the need for a Behat Plugin, working similar to how your PHPUnit Plugin has been implemented for use with my Behat Tasks. This should have the ability to take a list of command line arguments and execute them within the same Task process.

Cheers,

Kash

@KashifSaadat
Copy link
Author

@aranw
Copy link
Contributor

aranw commented May 22, 2014

Ah very nice, thanks for contributing 👍 😄

@KashifSaadat
Copy link
Author

:D

@mbfisher
Copy link
Contributor

Sorry for the slow response on this, will have some feedback tonight.

M

@mbfisher
Copy link
Contributor

Looks great!

Defo done the right thing going with ArgvInput for the time being; I've had a further look at integrating with Behat's Application and it's pretty gnarly. The Command::add method covers off new arguments that are added to Behat before the plugin is updated, which I don't think will be very common.

A couple of notes, of course IMHO:

  • On the Command class method names, I would use set* for options with values e.g.

setSuite('foo') # --suite foo

but not for positional arguments or VALUE_NONE options, as you've done with

appendSnippets # --append-snippets

I'd do the same for useColor, useStrict, stopOnFailure etc.

  • I'd split the DirectoryManager into its own package with some integration tests. kash/cd perhaps?
  • I don't think you can assert that collaborator methods are called in a set order with PhpSpec, which would improve the example dealing with changing to a working directory, but I've tweeted asking for advice to check.
  • Finally, and most importantly, it needs a README with examples, installation instructions, and API documentation.

Then we'll need to figure out a process for adopting plugins into the task vendor!

@aranw, got any thoughts?

Thanks again for contributing!

M

@KashifSaadat
Copy link
Author

Awesome cheers for the feedback!

When I get some time I'll make a few revisions and update here.

@KashifSaadat
Copy link
Author

I've now made the suggested updates. Apologies for the README, it is a bit pants currently. :O

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

No branches or pull requests

3 participants