sebastianbergmann/php-code-coverage — Issue #93: Code coverage bug on Windows
Author: vershnik
Created: 2012-03-02 11:47:57+00:00
State: open

Hi

This bug appers when using CodeCoverage for files on different logical disks in Windows
For example I have Zend Framework library on disk D: and project files on disk E:

As paths are completely different PHP_CodeCoverage_Report_Factory fails to find CommonPath
and creates Root node with an empty path

In PHP\CodeCoverage\Report\Node.php:142 there is code which creates node path:
$this->path = $this->parent->getPath() . '/' . $this->name;

As we have empty path in Root node, all paths will start with slash /
/D:/php5/php/Zend/library
/E:/projects/test

so they are not added to report