Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testAskConfirmation PHP Method

testAskConfirmation() public method

public testAskConfirmation ( $question, $expected, $default = true )
    public function testAskConfirmation($question, $expected, $default = true)
    {
        $dialog = new QuestionHelper();

        $inputStream = $this->getInputStream($question."\n");
        $question = new ConfirmationQuestion('Do you like French fries?', $default);
        $this->assertEquals($expected, $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question), 'confirmation question should '.($expected ? 'pass' : 'cancel'));
    }