PHPUnit whitelist code coverage

The whitelist does not work as I expect when I receive code coverage reports. I use the Zend Framework, and my Zend files are also in the library directory, as is the quick start of the project.

I am running PHPUnit 3.6 from Netbeans 7.0.1

I really want to see coverage for classes for MyLib .

 <whitelist> <directory suffix=".php">../../library/MyLib</directory> </whitelist> 

But in the report, I seem to get a percentage value for multiple Zend files, for example. Zend_Controller_Front , Zend_Loader_Autoloader , etc.

Obviously, I have not written any tests for these classes, and it is not surprising that I have 0% coverage.

What did I miss?

+8
php phpunit zend-framework netbeans-7 whitelist
source share
1 answer

Please use absolute paths in your XML file and / or make sure that they are correctly resolved by your test-runner phpunit call. Also make sure your XML file is uploaded.

+1
source share

All Articles