Esempio n. 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);
     $commandTester->execute($args);
     return $commandTester;
 }
Esempio n. 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->boot($input, $output);
     $cv = new Application();
     $sh = new \Psy\Shell();
     $sh->addCommands($cv->createCommands());
     // When I try making a new matcher, it doesn't seem to get called.
     //$sh->addTabCompletionMatchers(array(
     //  new ApiMatcher(),
     //));
     $sh->run();
 }
Esempio n. 3
0
 /**
  * Primary entry point for execution of the standalone command.
  */
 public static function main($binDir)
 {
     $application = new Application('cv', '@package_version@');
     $application->run();
 }