Skip to content

Coverage is not collected when no assertion is expected #921

@mvorisek

Description

@mvorisek
Q A
php-code-coverage version 9.2.15
PHP version 8.0.20
Driver Xdebug
Xdebug version 3.1.5
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.5.21

@doesNotPerformAssertions [1] annotation silences risky warning when no assertion is performed, but it does not skip the test.

Currently, it removes the test coverage. But as the test is run, coverage must be collected as if this annotation was not present.

image

[1] https://phpunit.readthedocs.io/en/9.5/annotations.html#doesnotperformassertions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions