View Issue Details

IDProjectCategoryView StatusLast Update
0001027XdebugUsage problems (Wrong Results)public2014-03-05 09:33
ReporterTominatorAssigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Platformx64OSWindowsOS Version8
Product Version2.2.3 
Target VersionFixed in Version 
Summary0001027: Code coverage doesn't work when dealing with PEAR
DescriptionHi,
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 ReproduceI made a small project (attached).

- install PEAR MDB2:
* http://pear.php.net/manual/en/installation.getting.php
* 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 InformationThanks for any info!
TagsNo tags attached.
Operating SystemWindows 8 x64
PHP Version5.4.7

Activities

Tominator

2014-01-24 16:55

reporter  

coveragetest.zip (466,469 bytes)

Tominator

2014-01-28 10:23

reporter   ~0002670

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!

derick

2014-03-05 09:33

administrator   ~0002754

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.

Issue History

Date Modified Username Field Change
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)