Skip to content

All ternary branches must be measured #1029

Open
@mvorisek

Description

@mvorisek
Q A
php-code-coverage version 10.1.11
PHP version 8.3.0
Driver Xdebug
PCOV version (if used) n/a
Xdebug version (if used) 3.3.1
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 10.5.9

repro code: https://github.com/atk4/data/blob/9e46bc827f/src/Reference/ContainsOne.php#L20

https://app.codecov.io/gh/atk4/data/pull/1158/blob/src/Reference/ContainsOne.php#L20

image

Expected behaviour:

Both false/true ternary (and also null coalescing branch of null coalescing operator) must be measured.

In the screenshot above, the l20 must be either green or red.

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