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" CLI option is documented wrong #4590

Closed
mvorisek opened this issue Jan 23, 2021 · 3 comments · Fixed by nextcloud/polls#1475
Closed

"--coverage-text" CLI option is documented wrong #4590

mvorisek opened this issue Jan 23, 2021 · 3 comments · Fixed by nextcloud/polls#1475
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Jan 23, 2021

Q A
PHPUnit version 9.5.1
PHP version 7.4
Installation Method Composer

Summary

--coverage-text <file> as per https://phpunit.readthedocs.io/en/9.5/textui.html should accept <file>. But when <file> is set, phpunit fails.

Other formats work well with <file> option set.

Current behavior

PHPUnit 9.5.1 by Sebastian Bergmann and contributors.
Cannot open file "/builds/coverage_phpunit.txt".

How to reproduce

phpunit --coverage-text "/builds/coverage_phpunit.txt"

Expected behavior

phpunit does not fail with Cannot open file "/builds/coverage_phpunit.txt" message and coverage text output is saved to the given file.

@mvorisek mvorisek added the type/bug Something is broken label Jan 23, 2021
@mvorisek mvorisek changed the title --coverage-text <file> "--coverage-text" option does not work correctly with "<file>" option set Jan 23, 2021
@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Jan 24, 2021
@sebastianbergmann sebastianbergmann changed the title "--coverage-text" option does not work correctly with "<file>" option set "--coverage-text" CLI option is documented wrong Jan 24, 2021
@sebastianbergmann
Copy link
Owner

This was a documentation issue. You need to use --coverage-text=file instead of --coverage-text file.

@mvorisek
Copy link
Contributor Author

Thanks - other options remain without =, right? Is this welcomed to be normalized or you want to keep it like that for BC?

@sebastianbergmann
Copy link
Owner

--coverage-text is special in that its parameter is optional. There is nothing to be normalized here.

This was referenced Mar 12, 2021
This was referenced Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment