Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Add support for error ouput in the CommandTester#27434
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Console] Add support for error ouput in the CommandTester#27434
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| CHANGELOG | ||
| ========= | ||
| 4.1.1 |
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.
4.2.0, new features are for minor releases
| } | ||
| /** | ||
| * Initialize the output property. |
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.
Initializes
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.
this comment is still relevant, we use the 3rd person form to describe methods
| $tester->run(array( | ||
| 'command' =>'foo', | ||
| 'foo' =>'bar', | ||
| ), |
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.
on one line please
Uh oh!
There was an error while loading.Please reload this page.
| * | ||
| * @param array $options An array of options | ||
| * | ||
| * @return self |
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.
this one is not true and returning void is fine. Both@param and@return annotations should be removed as they do not provide any information that is not already provided by the method signature.
| * * interactive: Sets the input interactive flag | ||
| * * decorated: Sets the output decorated flag | ||
| * * verbosity: Sets the output verbosity flag | ||
| * * capture_stderr_separately: Make output of stdOut and stdErr separately available |
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.
should be aligned
chalasr left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
@cdekok Would you mind addressing the remaining minor comments and rebase your branch?
src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
35d41c6 to8a076d1Compare8a076d1 tocec5317Comparechalasr commentedSep 23, 2018
Nice first contribution! Thank you@cdekok |
…ster (cdekok)This PR was merged into the 4.2-dev branch.Discussion----------[Console] Add support for error ouput in the CommandTesterMove initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass? | yes| Fixed tickets |#27422| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->Make it possible to test seperate stderr output.```$tester = new CommandTester($command);$tester->execute( array('foo' => 'bar'), array('capture_stderr_separately' => true));$this->assertEquals('foo', $tester->getErrorOutput());````Commits-------cec5317 [Console] Add support for error ouput in the CommandTester
Move initialization of the streams to the trait so the
capture_stderr_separatelyalso works in the CommandTester.Make it possible to test seperate stderr output.