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

[BUGFIX] Drop @covers annotation referencing inexistent method #809

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliverklee
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jan 25, 2025

Coverage Status

coverage: 42.018% (-0.2%) from 42.261%
when pulling 1b26da1 on bugfix/covers
into 7c6845f on main.

Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

The method definitely exists. The error is for some other reason. I don't know what.

The @covers annotation looks correct to me.

oliverklee added a commit that referenced this pull request Jan 26, 2025
According to the PHPUnit documentation [1], `@covers` annotations
are only recommended to reference classes (and global functions),
but not methods from classes.

Also sort the `@covers` annotations.

Note: This will probably artificially increase our calculated
code coverage numbers until we migrate our tests to more
focused unit tests.

Closes #809

[1] https://docs.phpunit.de/en/8.5/annotations.html#covers
@oliverklee
Copy link
Contributor Author

As @covers annotations referencing class methods are not recommended anyway (documentation on this), I have now created #820 as an alternative.

oliverklee added a commit that referenced this pull request Jan 26, 2025
According to the PHPUnit documentation [1], `@covers` annotations
are only recommended to reference classes (and global functions),
but not methods from classes.

Also sort the `@covers` annotations.

Note: This will probably artificially increase our calculated
code coverage numbers until we migrate our tests to more
focused unit tests.

Closes #809

[1] https://docs.phpunit.de/en/8.5/annotations.html#covers
@oliverklee oliverklee marked this pull request as draft January 26, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants