Skip to content

Method with "return with multiline constant expr only" is not generating any coverage lines #946

Closed
@mvorisek

Description

@mvorisek
Q A
php-code-coverage version 9.2.17 / latest
PHP version 8.0.24
Driver Xdebug
Xdebug version 3.2.0RC1
Installation Method Composer
Usage Method PHPUnit
PHPUnit version 9.5.25

code:

https://github.com/atk4/data/blob/0c6bce5c2ac53589934b02bc0832a4753c283f15/src/Persistence/Sql/Oracle/PlatformTrait.php#L104-L109

is not generating any coverage line:

...
    <file name="/__w/data/data/src/Persistence/Sql/Oracle/PlatformTrait.php">
      <class name="Atk4\Data\Persistence\Sql\Oracle\PlatformTrait" namespace="global">
        <metrics complexity="7" methods="5" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="24" coveredstatements="24" elements="29" coveredelements="29"/>
      </class>
      <line num="12" type="method" name="getVarcharTypeDeclarationSQL" visibility="public" complexity="1" crap="1" count="209"/>
      <line num="14" type="stmt" count="209"/>
      ...
      <line num="74" type="stmt" count="231"/>
      <line num="94" type="stmt" count="231"/>
      <line num="95" type="stmt" count="231"/>
      <line num="96" type="stmt" count="231"/>
      <line num="99" type="stmt" count="231"/>
      <line num="101" type="stmt" count="231"/>
      <metrics loc="121" ncloc="101" classes="1" methods="5" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="24" coveredstatements="24" elements="29" coveredelements="29"/>
    </file>
...

image

I would expect at least one coverage line for the getListDatabasesSQL method to be able to tell if called or not

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