[Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor
This commit is contained in:
parent
416f0abf99
commit
474f3bef08
@ -151,7 +151,7 @@ qqq:
|
||||
[łabądź] baz
|
||||
>
|
||||
EOT
|
||||
, $output);
|
||||
, $output, true);
|
||||
}
|
||||
|
||||
public function testChoiceQuestionCustomPrompt()
|
||||
@ -170,7 +170,7 @@ EOT
|
||||
[0] foo
|
||||
>ccc>
|
||||
EOT
|
||||
, $output);
|
||||
, $output, true);
|
||||
}
|
||||
|
||||
protected function getInputStream($input)
|
||||
@ -200,10 +200,15 @@ EOT
|
||||
return $mock;
|
||||
}
|
||||
|
||||
private function assertOutputContains($expected, StreamOutput $output)
|
||||
private function assertOutputContains($expected, StreamOutput $output, $normalize = false)
|
||||
{
|
||||
rewind($output->getStream());
|
||||
$stream = stream_get_contents($output->getStream());
|
||||
|
||||
if ($normalize) {
|
||||
$stream = str_replace(PHP_EOL, "\n", $stream);
|
||||
}
|
||||
|
||||
$this->assertStringContainsString($expected, $stream);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user