sebastianbergmann/php-code-coverage — Issue #80: When the whitelist has a nonexistent file, CodeCoverage.php errors
Author: bskendig
Created: 2011-11-17 19:28:48+00:00
State: open

In my phpunit configuration xml file, if I whitelist a file that doesn't exist, like:

DoesNotExist.php

Then PHP_CodeCoverage will throw an error when it's run:

[exec] Warning: include_once(0): failed to open stream: No such file or directory in /usr/local/zend/share/pear-new/PHP/CodeCoverage.php on line 516
[exec]
[exec] Call Stack:
[exec] 0.0003 322072 1. {main}() /usr/local/zend/bin/phpunit:0
[exec] 0.0042 690500 2. PHPUnit_TextUI_Command::main() /usr/local/zend/bin/phpunit:44
[exec] 0.0043 690836 3. PHPUnit_TextUI_Command->run() /usr/local/zend/share/pear-new/PHPUnit/TextUI/Command.php:125
[exec] 0.1288 9579076 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/zend/share/pear-new/PHPUnit/TextUI/Command.php:187
[exec] 154.7161 123974716 5. PHP_CodeCoverage_Report_Clover->process() /usr/local/zend/share/pear-new/PHPUnit/TextUI/TestRunner.php:352
[exec] 154.7162 123975444 6. PHP_CodeCoverage->getReport() /usr/local/zend/share/pear-new/PHP/CodeCoverage/Report/Clover.php:85
[exec] 154.7166 124010716 7. PHP_CodeCoverage_Report_Factory->create() /usr/local/zend/share/pear-new/PHP/CodeCoverage.php:141
[exec] 154.7166 124010716 8. PHP_CodeCoverage->getData() /usr/local/zend/share/pear-new/PHP/CodeCoverage/Report/Factory.php:65
[exec] 154.7166 124010716 9. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() /usr/local/zend/share/pear-new/PHP/CodeCoverage.php:173

I'm logging this as a bug because it took me a while to figure out what was causing the error message.