You are here

public function QuestionHelperTest::testAskHiddenResponse 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::testAskHiddenResponse()

File

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

Class

QuestionHelperTest
@group tty

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testAskHiddenResponse() {
  if ('\\' === DIRECTORY_SEPARATOR) {
    $this
      ->markTestSkipped('This test is not supported on Windows');
  }
  $dialog = new QuestionHelper();
  $dialog
    ->setInputStream($this
    ->getInputStream("8AM\n"));
  $question = new Question('What time is it?');
  $question
    ->setHidden(true);
  $this
    ->assertEquals('8AM', $dialog
    ->ask($this
    ->createInputInterfaceMock(), $this
    ->createOutputInterface(), $question));
}