public function testChoose() { $question_helper = $this->prophesize('Symfony\\Component\\Console\\Helper\\QuestionHelper'); $this->helperSet->get('question')->willReturn($question_helper)->shouldBeCalled(); $question_helper->ask($this->input->reveal(), $this->output->reveal(), Argument::that(function ($question) { // TODO: The proper error message isn't tested. return $question instanceof ChoiceQuestion && $question->getQuestion() === '<question>text</question> ' && $question->getChoices() === array('option_1', 'option_2') && $question->getDefault() === 'option_2'; }))->shouldBeCalled(); $this->io->choose('text', array('option_1', 'option_2'), 'option_2', 'error msg'); }