Skip to content

Commit a8967ba

Browse files
committed
fixed deprecation notices
1 parent 38bf119 commit a8967ba

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,7 @@ public function testLegacyChoiceOutputFormattingQuestionForUtf8Keys()
751751
public function testAskThrowsExceptionOnMissingInput()
752752
{
753753
$dialog = new QuestionHelper();
754-
$dialog->setInputStream($this->getInputStream(''));
755-
756-
$dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), new Question('What\'s your name?'));
754+
$dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?'));
757755
}
758756

759757
/**
@@ -763,7 +761,6 @@ public function testAskThrowsExceptionOnMissingInput()
763761
public function testAskThrowsExceptionOnMissingInputWithValidator()
764762
{
765763
$dialog = new QuestionHelper();
766-
$dialog->setInputStream($this->getInputStream(''));
767764

768765
$question = new Question('What\'s your name?');
769766
$question->setValidator(function () {
@@ -772,7 +769,7 @@ public function testAskThrowsExceptionOnMissingInputWithValidator()
772769
}
773770
});
774771

775-
$dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question);
772+
$dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), $question);
776773
}
777774

778775
protected function getInputStream($input)

src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ public function testAskEscapeLabel()
108108
public function testAskThrowsExceptionOnMissingInput()
109109
{
110110
$dialog = new SymfonyQuestionHelper();
111-
112-
$dialog->setInputStream($this->getInputStream(''));
113-
$dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), new Question('What\'s your name?'));
111+
$dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?'));
114112
}
115113

116114
protected function getInputStream($input)

0 commit comments

Comments
 (0)