예제 #1
0
 /**
  * @param InputInterface $input
  * @param OutputInterface $output
  */
 public function run(InputInterface $input = null, OutputInterface $output = null)
 {
     if (!$input) {
         $input = new ArgvInput();
     }
     if (!$output) {
         $output = new ConsoleOutput();
     }
     if (!$input->hasArgument(0)) {
         $this->printJobsList($output);
     } else {
         $this->runJob($input->getArgument(0), $input, $output);
     }
 }
예제 #2
0
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Token 123 is not set
  */
 public function testGetArgumentThrowsExceptionWhenArgumentIsNotSet()
 {
     $input = new ArgvInput([]);
     $input->getArgument(123);
 }