Skip to content

Commit 2f6d80f

Browse files
committed
Merge branch '5.0'
* 5.0: Avoid stale-if-error if kernel.debug = true, because it hides errors [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor [SecurityBundle] Fix collecting traceable listeners info using anonymous: lazy [Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace [Workflow] Fix configuration node reference for "initial_marking" expand listener in place [DI] deferred exceptions in ResolveParameterPlaceHoldersPass Do not throw exception on valut generate key
2 parents 61a4afd + 062fa14 commit 2f6d80f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Tests/Helper/SymfonyQuestionHelperTest.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ public function testChoiceQuestionPadding()
145145
);
146146

147147
$this->assertOutputContains(<<<EOT
148-
qqq:
148+
qqq:
149149
[foo ] foo
150150
[żółw ] bar
151151
[łabądź] baz
152152
>
153153
EOT
154-
, $output);
154+
, $output, true);
155155
}
156156

157157
public function testChoiceQuestionCustomPrompt()
@@ -168,9 +168,9 @@ public function testChoiceQuestionCustomPrompt()
168168
$this->assertOutputContains(<<<EOT
169169
qqq:
170170
[0] foo
171-
>ccc>
171+
>ccc>
172172
EOT
173-
, $output);
173+
, $output, true);
174174
}
175175

176176
protected function getInputStream($input)
@@ -200,10 +200,15 @@ protected function createInputInterfaceMock($interactive = true)
200200
return $mock;
201201
}
202202

203-
private function assertOutputContains($expected, StreamOutput $output)
203+
private function assertOutputContains($expected, StreamOutput $output, $normalize = false)
204204
{
205205
rewind($output->getStream());
206206
$stream = stream_get_contents($output->getStream());
207+
208+
if ($normalize) {
209+
$stream = str_replace(PHP_EOL, "\n", $stream);
210+
}
211+
207212
$this->assertStringContainsString($expected, $stream);
208213
}
209214
}

0 commit comments

Comments
 (0)