Skip to content

Method name should not appear in the method signature attribute of Cobertura XML #846

Closed
@derekrprice

Description

@derekrprice
Q A
php-code-coverage version 9.2.5
PHP version 7.4
Driver Xdebug
Xdebug version (if used) 2.9.8
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.5.1

I'm not actually sure that this is a problem with the new cobertura.xml support in php-code-coverage from PR #812 or in AzureDevops, but I suspect the former. At the least, it is probably out of sync with other Cobertura generators. The name of methods appears in both the "name" and "signature" attributes in the generated XML, like so:

<method name="__construct" signature="__construct(string $identifier, League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface $refreshTokenRepository)

This causes the Azure DevOps code coverage plugin to then render every name twice:
image

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