Robo\Robo::run PHP Method

run() public static method

Entrypoint for standalone Robo-based tools. See docs/framework.md.
public static run ( string[] $argv, string $commandClasses, null | string $appName = null, null | string $appVersion = null, null | Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
$argv string[]
$commandClasses string
$appName null | string
$appVersion null | string
$output null | Symfony\Component\Console\Output\OutputInterface
return integer
    public static function run($argv, $commandClasses, $appName = null, $appVersion = null, $output = null)
    {
        $runner = new \Robo\Runner($commandClasses);
        $statusCode = $runner->execute($argv, $appName, $appVersion, $output);
        return $statusCode;
    }

Usage Example

Esempio n. 1
0
 public function testRoboStaticRunMethod()
 {
     $argv = ['placeholder', 'test:symfony-style'];
     $commandFiles = ['\\Robo\\RoboFileFixture'];
     Robo::run($argv, $commandFiles, 'MyApp', '1.2.3', $this->guy->capturedOutputStream());
     $this->guy->seeInOutput('Some text in section one.');
 }