コード例 #1
0
 /**
  * Create the CommandAssistant.
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  */
 private function setInputAndOutput(InputInterface $input, OutputInterface $output)
 {
     if (is_null($this->assistant)) {
         $this->assistant = new CommandAssistant();
         $this->assistant->setQuestionHelper($this->getQuestionHelper());
         $this->assistant->setKernel($this->getApplication()->getKernel());
     }
     $this->assistant->setOutput($output);
     $this->assistant->setInput($input);
 }
コード例 #2
0
 protected function getAssistant()
 {
     $output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface');
     $commandAssistant = new CommandAssistant();
     $commandAssistant->setOutput($output);
     return $commandAssistant;
 }