View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001027||Xdebug||Usage problems (Wrong Results)||public||2014-01-24 16:55||2014-03-05 09:33|
|Status||resolved||Resolution||no change required|
|Target Version||Fixed in Version|
|Summary||0001027: Code coverage doesn't work when dealing with PEAR|
I have a project that uses the PEAR MDB2 package for database access. When I run phpunit with code coverage, I get output, but none of my classes are included. It might be a problem with phpunit, or with xdebug.
When I remove the PEAR dependency for testing, the coverage output is correct (all my classes are included)
|Steps To Reproduce||I made a small project (attached).|
- install PEAR MDB2:
* pear install "channel://pear.php.net/MDB2-2.5.0b5"
* pear install "channel://pear.php.net/MDB2_Driver_mysql-1.5.0b4"
- run composer_update.bat (to populate the vendor/ folder)
- run phpunit_unit.bat
Now, inside the "coverage" folder (also in the example zip attached) you see my output: C_\xampp\php\pear (with nothing in it) and E_\Temp\coveragetest\libs with nothing in it.
When you now go to the file tests\unit\libtests\CalculatorTest.php and you remove the "require" line on top, and re-run phpunit_unit.bat, you will see in the coverage directory that a new directory is made: libs\ and that it contains Calculator.php information.
|Additional Information||Thanks for any info!|
|Tags||No tags attached.|
|Operating System||Windows 8 x64|
coveragetest.zip (466,469 bytes)
I upgraded my xampp this weekend, and guess what, now coverage is generated successfully. Maybe it was related to the phpunit coverage module that also updated, I don't know.
At the moment, the generated HTML is no longer split up in C_ and E_ folders. Maybe it's because I installed the new xampp to my E drive, together with my test project, so it didn't need to create the extra folders...?
This issue may have low priorty, because I've no idea which software caused it, but thanks for reading anyway!
||Glad to know that it works now. I'm closing this issue out, but feel free to reopen if this returns. Right now, I've no idea what could cause this and as it works, it makes little sense to spend time on it.|
|2014-01-24 16:55||Tominator||New Issue|
|2014-01-24 16:55||Tominator||File Added: coveragetest.zip|
|2014-01-28 10:23||Tominator||Note Added: 0002670|
|2014-03-05 09:33||derick||Note Added: 0002754|
|2014-03-05 09:33||derick||Status||new => resolved|
|2014-03-05 09:33||derick||Resolution||open => no change required|
|2014-03-05 09:33||derick||Assigned To||=> derick|
|2016-07-31 12:36||derick||Category||Usage problems => Usage problems (Crashes)|
|2016-07-31 12:38||derick||Category||Usage problems (Crashes) => Usage problems (Wrong Results)|