public function getQuestion($question)
 {
     $class = Util::hasQuestionHelper() ? 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' : 'Rj\\FrontendBundle\\Command\\Options\\Legacy\\ChoiceQuestion';
     $question = new $class("<question>{$question}</question>", $this->allowedValues, $this->defaultValue);
     $question->setErrorMessage($this->errorMessage);
     return $question;
 }
 private function addConsoleHelpers(FrameworkApplication $app)
 {
     if (!Util::hasQuestionHelper()) {
         $helper = $app->getKernel()->getContainer()->get('rj_frontend.console.helper.question_legacy');
         $app->getHelperSet()->set($helper, 'question');
     }
 }
 protected function setUp()
 {
     $fs = new Filesystem();
     $fs->remove($this->baseDir = sys_get_temp_dir() . '/rj_frontend');
     mkdir($this->baseDir);
     $application = new Application();
     if (!Util::hasQuestionHelper()) {
         $helper = new \Rj\FrontendBundle\Command\Options\Legacy\QuestionHelper();
         $application->getHelperSet()->set($helper, 'question');
     }
     $application->add($this->getInstallCommand());
     $application->add($command = new SetupCommand());
     $this->command = $application->find($command->getName());
     $this->command->setRootDir($this->baseDir);
     $this->commandTester = new CommandTester($this->command);
 }
 public function getQuestion($question)
 {
     $class = Util::hasQuestionHelper() ? 'Symfony\\Component\\Console\\Question\\Question' : 'Rj\\FrontendBundle\\Command\\Options\\Legacy\\Question';
     return new $class("<question>{$question}</question>", $this->defaultValue);
 }