Closed
Description
Q | A |
---|---|
php-code-coverage version | 9.2.29 |
PHP version | 8.2.12 |
Driver | Xdebug |
PCOV version (if used) | n/a |
Xdebug version (if used) | 3.2.2 |
Installation Method | Composer |
Usage Method | PHPUnit |
PHPUnit version (if used) | 9.6.13 |
repro code:
class InitializerTraitTest extends TestCase
{
public function testInitDeclaredPublicException(): void
{
$m = new class() extends AbstractInitializerMock {
public function init(): void {}
};
}
}
(full source code: https://github.com/atk4/core/blob/5.0.0/tests/InitializerTraitTest.php#L72)
when the code above is modified like:
+ #[\Override]
public function init(): void {}
then the coverage is collected. It seems this lib does not account for single line methods (methods starting and ending at the same line, even a method attribute on another line is enough to enable coverage).
Metadata
Metadata
Assignees
Labels
No labels