taskphp / task

Pure PHP task runner
MIT License
183 stars 15 forks source link

New Behat Plugin #5

Open KashifSaadat opened 10 years ago

KashifSaadat commented 10 years ago

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 commented 10 years ago

https://github.com/KashifSaadat/task-behat

aranw commented 10 years ago

Ah very nice, thanks for contributing :+1: :smile:

KashifSaadat commented 10 years ago

:D

mbfisher commented 10 years ago

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

M

mbfisher commented 10 years ago

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:

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.

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 commented 10 years ago

Awesome cheers for the feedback!

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

KashifSaadat commented 10 years ago

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