phpunit merge two or more clover.xml reports

前端 未结 3 1622
粉色の甜心
粉色の甜心 2021-02-10 06:02

I have several clover.xml reports of different extensions of a projects. I want to combine them into one clover.xml and then create it into a clover html. But i see no way with

3条回答
  •  醉话见心
    2021-02-10 06:29

    Years later this issue is still partly unsolved. There is a project by SB that can merge clover files, but it requires php 5.6.

    None of the answers above work sufficiently well. Here is a gist of a merge thrown together. Constructive critisism welcome.

    Usage:

    php clover-merge.php -o merged.xml -f clover-phpunit.xml -f clover-phpspec.xml
    

    Posting it here for posterity too:

    project->asXML();
    }
    
    $fh = fopen($output ,'w');
    if (! $fh) {
        echo "Cannot open '$output' for writing\n";
        exit(2);
    }
    fwrite($fh, sprintf('%s', $buffer));
    fclose($fh);
    

提交回复
热议问题