-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add a test for command ListUsers (test emails) #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you @ker0x for feedbacks. This is fixed. |
fc39410
to
924445d
Compare
@javiereguiluz rebased! |
924445d
to
6fd129c
Compare
Maxime, thanks for providing this test and for your work in the review phase. Thanks to reviewers too! |
protected function setUp(): void | ||
{ | ||
if ('Windows' === \PHP_OS_FAMILY) { | ||
$this->markTestSkipped('`stty` is required to test this command.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to the abstract class is wrong. Not all command tests require stty
. And AFAICT, testing the list:users
command will not require stty as it is not an interactive command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmmm, you are right! Anybody willing to make a Pull Request to fix this? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #1230
The command list user was not tested until now, and that's quite sad because it's one of the only parts of the code that actually sends an email. Symfony has some tools for testing emails, let's use them!
I also refactored a little bit of command testing since there was an identical piece of code between test cases. (instantiating the command)