Skip to content

hiddeninput.exe not testable with interactive input #19463

Closed
@Fuzzyma

Description

@Fuzzyma

I wrote a console command which makes use of the setHidden feature to enter passwords.
When I wanted to test this command I came across a strange issue. My phpunit was stopping and hanging in the hiddeninput.exe process. Obviously the console was waiting for input.
hiddeninput.exe ignored my input given by

$command->setHelperSet($this->getHelperSet("SomeRandomInputString\n"));

I then was able to "unfreeze" my console by just giving the desired input to the console (just pressing enter in this case).

I uploaded an example project which comes with a command and a test to show this issue.
Just clone it, run composer install and phpunit to reproduce:
https://github.com/Fuzzyma/hidden-input-bug

PS: A pic showing what my console is doing:

hiddeninput

At the bottom you can see the process which runs at the moment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions