Skip to content

Commit

Permalink
Use the input stream handler instead of STDIN read which freezes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 18, 2022
1 parent b210812 commit 9ec4bea
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,8 @@ protected function captureTextFieldInput(PublicationFieldType $field): string

protected function captureArrayFieldInput(PublicationFieldType $field): array
{
$lines = [];
$this->output->writeln($field->name.' (end with an empty line)');
do {
$line = Str::replace("\n", '', fgets(STDIN));
if ($line === '') {
break;
}
$lines[] = trim($line);
} while (true);

return $lines;
return InputStreamHandler::call();
}

protected function captureImageFieldInput(PublicationFieldType $field, PublicationType $pubType): string
Expand Down

0 comments on commit 9ec4bea

Please sign in to comment.