I wrote some test and i want to generate unit testing with PHPUnit 3.6 RC 4 and PHP 5.3.6 and nothings happens :
phpunit --bootstrap Bootstrap.php --coverage-html ./tmp library/plugins/PluginTest.php
PHPUnit 3.6.0RC4 by Sebastian Bergmann.
...
Time: 0 seconds, Memory: 14.75Mb
OK (3 tests, 10 assertions)
It didn’t say anything about
I checked that xdebug is enable, here is my xdebug.ini :
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable=on
xdebug.default_enable=on
xdebug.remote_autostart=on
xdebug.remote_host=127.0.0.1,192.168.0/24,10.37.129.2,10.211.55.2
So i wonders what happens, is it something in Bootstrap file?
You are running a very old version of
PHPUnit 3.6. The current one is3.6.10and it’s been more than half a year of fixes 🙂The very early versions of PHPUnit 3.6 had issues with code coverage that have been fixed and chances are you are running into one of those.
Also more mature versions of 3.6 will give you proper error messages when code coverage can’t be generated.
So my answer is: Upgrade and in 95% of the cases the issue will go away or phpunit will tell you why it doesn’t work.