Skip to content

Improve tests #24

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

Merged
merged 6 commits into from
Dec 16, 2021
Merged

Improve tests #24

merged 6 commits into from
Dec 16, 2021

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Dec 10, 2021

These changes together stabilize the test suite and bring the code coverage to 100% (line/branch).

Commit details

Composer: improve PHPUnit version constraints

... as PHPUnit < 5.7.21 doesn't contain the forward compatibility layer with namespaced classes.

PHPUnit: improve configuration

  • Add more detailed basic test configuration
  • Unless junit is used somewhere, generating this report for code coverage is unnecessary.
  • Generating the text report, however, is useful.

ConsoleColor: mark two methods as untestable

These methods cannot be tested as the result is system dependent and cannot be emulated.

ConsoleColor::addTheme(): add test for exception

ConsoleColor::getThemes(): add perfunctory unit test

Tests: add @Covers tag

... to document what each test is testing.

... as PHPUnit < 5.7.21 doesn't contain the forward compatibility layer with namespaced classes.
* Add more detailed basic test configuration
* Unless `junit` is used somewhere, generating this report for code coverage is unnecessary.
* Generating the text report, however, is useful.
These methods cannot be tested as the result is system dependent and cannot be emulated.
@jrfnl jrfnl added this to the 1.x Next Release milestone Dec 10, 2021
@jrfnl jrfnl requested a review from grogy December 10, 2021 11:55
@jrfnl jrfnl force-pushed the feature/improve-tests branch from f7b8ffa to fdddebb Compare December 11, 2021 06:45
@grogy grogy merged commit da39cd2 into master Dec 16, 2021
@jrfnl jrfnl deleted the feature/improve-tests branch December 16, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants