Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  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
  • Loading branch information
chalasr committed Jan 10, 2020
2 parents 33b74ac + e9ee09d commit 062fa14
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Tests/Helper/SymfonyQuestionHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ public function testChoiceQuestionPadding()
);

$this->assertOutputContains(<<<EOT
qqq:
qqq:
[foo ] foo
[żółw ] bar
[łabądź] baz
>
EOT
, $output);
, $output, true);
}

public function testChoiceQuestionCustomPrompt()
Expand All @@ -168,9 +168,9 @@ public function testChoiceQuestionCustomPrompt()
$this->assertOutputContains(<<<EOT
qqq:
[0] foo
>ccc>
>ccc>
EOT
, $output);
, $output, true);
}

protected function getInputStream($input)
Expand Down Expand Up @@ -200,10 +200,15 @@ protected function createInputInterfaceMock($interactive = true)
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);
}
}

0 comments on commit 062fa14

Please sign in to comment.