/** * @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); } }
/** * @expectedException \RuntimeException * @expectedExceptionMessage Token 123 is not set */ public function testGetArgumentThrowsExceptionWhenArgumentIsNotSet() { $input = new ArgvInput([]); $input->getArgument(123); }