You are here

public function QuestionHelperTest::testAskConfirmationWithCustomTrueAnswer in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Helper/QuestionHelperTest.php \Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testAskConfirmationWithCustomTrueAnswer()

File

vendor/symfony/console/Tests/Helper/QuestionHelperTest.php, line 176

Class

QuestionHelperTest
@group tty

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testAskConfirmationWithCustomTrueAnswer() {
  $dialog = new QuestionHelper();
  $dialog
    ->setInputStream($this
    ->getInputStream("j\ny\n"));
  $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i');
  $this
    ->assertTrue($dialog
    ->ask($this
    ->createInputInterfaceMock(), $this
    ->createOutputInterface(), $question));
  $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i');
  $this
    ->assertTrue($dialog
    ->ask($this
    ->createInputInterfaceMock(), $this
    ->createOutputInterface(), $question));
}