Skip to content

Instantly share code, notes, and snippets.

@elmpp
Created November 12, 2016 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elmpp/0f760a99338f4e016373356f5b2c8493 to your computer and use it in GitHub Desktop.
Save elmpp/0f760a99338f4e016373356f5b2c8493 to your computer and use it in GitHub Desktop.
/**
* $args example:
* array(3) {
[0]=>
string(15) "wiremock:record"
["feed"]=>
string(5) "CORAL"
["background"]=>
bool(true)
}
*
* @param $task
* @param array $args
* @return int
*/
protected function runRoboTask($task, $args = []) {
$runner = new \Robo\Runner();
$inputArr = array_merge([
0 => $task,
],
$args
);
$input = new ArrayInput($inputArr);
$output = $this->getOutput();
return $runner->run($input, $this->getOutput());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment