Example #1
0
 /**
  * Create a helper for executing command-tests in our application.
  *
  * @param array $args must include key "command"
  * @return \Symfony\Component\Console\Tester\CommandTester
  */
 public function createCommandTester($args)
 {
     if (!isset($args['command'])) {
         throw new \RuntimeException("Missing mandatory argument: command");
     }
     $application = new Application();
     $command = $application->find($args['command']);
     $commandTester = new CommandTester($command);
     $options = array('interactive' => FALSE);
     $commandTester->execute($args, $options);
     return $commandTester;
 }
Example #2
0
 /**
  * Primary entry point for execution of the standalone command.
  */
 public static function main($binDir)
 {
     $application = new Application('git-scan', '@package_version@');
     $application->run();
 }