Skip to content
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

coverage-text: do not use colors if --colors=never #1907

Closed
wants to merge 4 commits into from
Closed

coverage-text: do not use colors if --colors=never #1907

wants to merge 4 commits into from

Conversation

gkralik
Copy link
Contributor

@gkralik gkralik commented Oct 7, 2015

Don't use colors when using --coverage-text along with --colors=never.

See #1771 and #1892

(replaces #1906)

if --colors=never is used with --coverage-text, no colored
output should be printed.

refs #1771
refs #1892
@@ -490,6 +490,9 @@ class_exists($arguments['printer'], false)) {
if ($arguments['coverageText'] == 'php://stdout') {
$outputStream = $this->printer;
$colors = $arguments['colors'];
if($colors == PHPUnit_TextUI_ResultPrinter::COLOR_NEVER) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just $colors = $arguments['colors'] && $arguments['colors'] != PHPUnit_TextUI_ResultPrinter::COLOR_NEVER?

Copy link
Contributor

Choose a reason for hiding this comment

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

just thinking about avoiding a double assignment - maybe your way is more readable though :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, just thought about the same thing... will change it

there is no coverage driver for PHP 7 on travis right now,
so just skip it. it can be enabled as soon as xdebug supports
code coverage on PHP 7
@GrahamCampbell
Copy link
Contributor

👍

@sebastianbergmann
Copy link
Owner

Merged manually, thanks.

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Oct 14, 2015
@gkralik gkralik deleted the fix/coverage-text-colors-never branch October 14, 2015 08:09
@GrahamCampbell
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants