sebastianbergmann/php-code-coverage — pull request #84 by victorgp (2011-12-20 13:48:48+00:00)
Title: cleaning filename returned wrongly due to an XDebug bug

XDebug has a bug which is causing the deletion of some files in the php-code-coverage.

When there is an assert or an eval, XDebug returns a wrong file name, something like:

"/path/path/path/myClass.php(444) : assert code"

They have an open bug since 2007 so it seems that is very low priority for them and they don't have intentions to fix it:

http://bugs.xdebug.org/bug_view_page.php?bug_id=0000331

With the current approach of this coverage tool, if the file doesn't exist, is not included in the coverage report and this files wrongly returned by XDebug are, therefore, don't included. So this can be considered a bug.

This change just sanitize the file name returned by XDebug in order to consider them as valid so can be added to the coverage report.