-
Notifications
You must be signed in to change notification settings - Fork 144
[TASK] Reduce and finetune the scope of @covers
annotations
#1188
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the TestCase
s do seem to at least partially cover some specific classes...
* @covers \Sabberworm\CSS\OutputFormat | ||
* @covers \Sabberworm\CSS\OutputFormatter | ||
* @coversNothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this cover Comment::render()
and ParserState::consumeWhitespace()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment::render()
is called. As far as I understand the tests (which is not far), they're about other elements rendering comments (or not) depending on the OutputFormat
settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's outputFormatter::comments()
where the controlling logic is.
@@ -11,7 +11,7 @@ | |||
use Sabberworm\CSS\Parsing\OutputException; | |||
|
|||
/** | |||
* @covers \Sabberworm\CSS\OutputFormat | |||
* @coversNothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this covering various OutputFormat
methods (create*
and some of the setters)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand this test, it's not about covering how OutputFormat
works, but about how other elements get rendered depending on the output format.
* @covers \Sabberworm\CSS\Value\LineName | ||
* @covers \Sabberworm\CSS\Value\Size | ||
* @covers \Sabberworm\CSS\Value\URL | ||
* @coversNothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree it's generally not clear which of the classes this covers - but doesn't it at least cover Settings
to some extent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It calls code in Settings
(and uses it). It does not test whether Settings
actually work correctly, though, and the point of the tests is not testing Settings
(as far as I understand them), but how other code works depending on the settings.
I'd like to reduce what the legacy tests cover in general, and re-add the |
The legacy tests are not very focused. Until we have split them up, try to avoid false positives for code coverage. Also add `@covers` annotations for the parent classes of the tested classes.
8c70c85
to
d6ad84c
Compare
The legacy tests are not very focused. Until we have split them up, try to avoid false positives for code coverage.
Also add
@covers
annotations for the parent classes of the tested classes.