minor #22927 [Console] Fix tests (ogizanagi)
This PR was merged into the 3.2 branch.
Discussion
----------
[Console] Fix tests
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Fix the failing test on 3.2 branch due to the `setInputStream` method deprecation.
Commits
-------
01ca241
[Console] Fix tests
This commit is contained in:
commit
e37455fbe6
@ -278,14 +278,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
||||
);
|
||||
|
||||
$dialog = new QuestionHelper();
|
||||
$dialog->setInputStream($this->getInputStream($providedAnswer."\n"));
|
||||
$inputStream = $this->getInputStream($providedAnswer."\n");
|
||||
$helperSet = new HelperSet(array(new FormatterHelper()));
|
||||
$dialog->setHelperSet($helperSet);
|
||||
|
||||
$question = new ChoiceQuestion('Please select the directory', $possibleChoices);
|
||||
$question->setMaxAttempts(1);
|
||||
$question->setMultiselect(true);
|
||||
$answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question);
|
||||
$answer = $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question);
|
||||
|
||||
$this->assertSame($expectedValue, $answer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user