Symfony\Component\Console\Command\Command::getHelperSet PHP Method

getHelperSet() public method

Gets the helper set.
public getHelperSet ( ) : Symfony\Component\Console\Helper\HelperSet
return Symfony\Component\Console\Helper\HelperSet A HelperSet instance
    public function getHelperSet()
    {
        return $this->helperSet;
    }

Usage Example

 /**
  * Mocks question helper.
  */
 protected function mockQuestionHelper()
 {
     $question_helper = $this->createMock('Symfony\\Component\\Console\\Helper\\QuestionHelper');
     foreach ($this->answers as $key => $answer) {
         // @TODO: Figure out where this key ofset comes from.
         $question_helper->expects($this->at($key + 2))->method('ask')->willReturn($answer);
     }
     // We override the question helper with our mock.
     $this->command->getHelperSet()->set($question_helper, 'question');
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::getHelperSet