Skip to content

Commit 0d024b0

Browse files
Merge branch '6.4' into 7.3
* 6.4: [Validator] Review Slovak translations restore translation source entries [Validator] Review Romanian translations [Console] Don’t append a new line to test inputs ending with an EOT
2 parents 471c5ae + 7d36330 commit 0d024b0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Tester/TesterTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ private static function createStream(array $inputs)
168168
$stream = fopen('php://memory', 'r+', false);
169169

170170
foreach ($inputs as $input) {
171-
fwrite($stream, $input.\PHP_EOL);
171+
fwrite($stream, $input);
172+
173+
if (!str_ends_with($input, "\x4")) {
174+
fwrite($stream, \PHP_EOL);
175+
}
172176
}
173177

174178
rewind($stream);

Tests/Tester/CommandTesterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testCommandWithMultilineInputs()
146146
$command = new Command('foo');
147147
$command->setHelperSet(new HelperSet([new QuestionHelper()]));
148148
$command->setCode(function (InputInterface $input, OutputInterface $output) use ($question, $command): int {
149-
$output->write($command->getHelper('question')->ask($input, $output, (new Question($question."\n"))->setMultiline(true)));
149+
$output->write($command->getHelper('question')->ask($input, $output, (new Question($question))->setMultiline(true)));
150150
$output->write(stream_get_contents($input->getStream()));
151151

152152
return 0;
@@ -162,7 +162,7 @@ public function testCommandWithMultilineInputs()
162162
$tester->execute([]);
163163

164164
$tester->assertCommandIsSuccessful();
165-
$this->assertSame($question."\n".$address."\n".$address."\n", $tester->getDisplay());
165+
$this->assertSame($question.$address.$address.\PHP_EOL, $tester->getDisplay());
166166
}
167167

168168
public function testCommandWithDefaultInputs()

0 commit comments

Comments
 (0)