-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPUnit Enricher: classnode is always null #332
Comments
This may be a problem with path mappings. Can you provide me with a simple example to reproduce this? |
Folder structure${basedir} phpdox.xml (non-phpunit sections removed)
Sanitized PHPUnit output (with source removed, please let me know if you need this)
note: original file names/classes and paths replaced, but the structure has not changed |
@theseer Did you have any luck reproducing this or would more information help? |
Yes, I found the reason. The coverage xml seems to have changed: The current implementation of the PHPUnit Enricher expects the name to be only the name without a namespace. I have to investigate when (and why?) that changed as I'm not aware of any changes in phpunit's code coverage output. Bear with me :) |
@theseer No problem at all, i did try to look into the xpath section of your code when debugging, but i couldnt seem to hit the bit where it actually does the query so hit a bit of a brick wall. |
Can you verify if the patch fixes it for you as well? |
Took a little bit for me to boot up the laptop, but i can confirm that the patch fixed it :) 👍 Thankyou 👍 |
Issue:
Code coverage seems to scan the coverage folder and adds the coverage section to the generated document but always reports the coverage as 0%.
Research:
Looking through the phpdox code and debugging each run; $classnode in TheSeer\phpDox\Generator\Enricher\PHPUnit:153 always seems to be null (code comment is "this class seems to be newer than the last phpunit run") when phpdox is run on a folder using a phpdox xml config file.
Notes:
The text was updated successfully, but these errors were encountered: