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
Add a complete test for AddUserCommand #480
Conversation
9bf8c8e
to
b48ab82
Compare
|
||
$commandTester = new CommandTester($command); | ||
$commandTester->setInputs($interactiveInputs); | ||
$commandTester->execute(array_merge(['command' => $command->getName()], $inputArgs)); |
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.
Is the command
argument required? I think we removed this in some past Symfony version ... but I could be perfectly wrong 😄
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.
You are absolutely right! 😄 👍 removed it.
b48ab82
to
a08c746
Compare
$isAdmin ? ['--admin' => 1] : [], | ||
// these are the responses given to the questions asked by the command | ||
// to get the value of the missing required arguments | ||
array_values($this->userdata) |
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.
@javiereguiluz $this->userData
😉
Thanks @dmaicher. |
…eguiluz) This PR was merged into the master branch. Discussion ---------- Add a complete test for AddUserCommand This adds a simple test for `AddUserCommand` that creates a user non-interactively and interactively. Fixes #473. Commits ------- 774adca Improved the PHPdoc of some methods c1d23f9 Fixed a variable name 3e15d59 Refactored the code and added some help notes a08c746 add simple test for AddUserCommand
This adds a simple test for
AddUserCommand
that creates a user non-interactively and interactively.Fixes #473.