-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Coverage XML can't handle files with just newlines #859
Comments
Thank you for your report. Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting. Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue. |
Ah, thanks for making me try to reproduce that 🙂 Consider this example:
and a file with just a newline in
It doesn't matter if it's a That will trigger the above error:
Does that help or should I push a git repo with above content? |
Sidenote: the parameter for the
That should help. @theseer Might be easier/quicker if you have a look. |
I have created a reproducing test case. Thank you, @rieschl, for investing the time to minimize your test case. Of course, the test case currently fails:
|
This is not a bug in this library, but in one of its dependencies. I have opened theseer/tokenizer#13 to track this. |
Should be fixed with the just released version 1.2.1. |
Thanks for the quick fix! |
When trying to create an XML coverage report
--coverage-xml
with PHPUnit withsomefiles with just newlines in the coverage.phtml
filesconfigurationdirectory, PHPUnit exits with error code2
and the message:Generating code coverage report in PHPUnit XML format ... Call to a member function getLine() on null
.When using another coverage report
or removing the directory with the phtml files in the config file,or removing the empty file the error is gone.I'm not quite sure how to debug this, as running PHPUnit with
--verbose --debug
doesn't print any additional lines.This is the
coverage
section of thephpunit.xml
file:Thanks!
Edit: edited the description to reflect the correct problem scenario
The text was updated successfully, but these errors were encountered: