Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged

Conversation

@cdekok
Copy link
Contributor

Move initialization of the streams to the trait so thecapture_stderr_separately also works in the CommandTester.

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#27422
LicenseMIT
Doc PRsymfony/symfony-docs#...

Make it possible to test seperate stderr output.

$tester->execute(    array('foo' => 'bar'),    array('capture_stderr_separately' => true));$this->assertEquals('foo', $tester->getErrorOutput());

OskarStark reacted with thumbs up emoji
CHANGELOG
=========

4.1.1
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Initializes

Copy link
Member

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',
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

on one line please

*
* @param array $options An array of options
*
* @return self
Copy link
Member

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should be aligned

cdekok added a commit to cdekok/symfony that referenced this pull requestJun 12, 2018
Copy link
Member

@chalasrchalasr left a comment
edited
Loading

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?

@chalasrchalasr changed the titleAdd support for error ouput in the CommandTester[Console] Add support for error ouput in the CommandTesterSep 23, 2018
@chalasrchalasrforce-pushed thefeature/command-tester-error-output branch 5 times, most recently from35d41c6 to8a076d1CompareSeptember 23, 2018 11:23
@chalasrchalasrforce-pushed thefeature/command-tester-error-output branch from8a076d1 tocec5317CompareSeptember 23, 2018 11:35
@chalasr
Copy link
Member

Nice first contribution! Thank you@cdekok

@chalasrchalasr merged commitcec5317 intosymfony:masterSep 23, 2018
chalasr pushed a commit that referenced this pull requestSep 23, 2018
…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
@nicolas-grekasnicolas-grekas modified the milestones:next,4.2Nov 1, 2018
This was referencedNov 3, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

5 participants

@cdekok@chalasr@OskarStark@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp