Skip to content
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

Incorrect line percentage #89

Closed
thewholelifetolearn opened this issue Apr 3, 2019 · 10 comments
Closed

Incorrect line percentage #89

thewholelifetolearn opened this issue Apr 3, 2019 · 10 comments

Comments

@thewholelifetolearn
Copy link

phpcov gives a 100% coverage for a method but not all are been tested. As it can be seen on the following screenshot, there are lines marked in red but the summary gives 100% covered.

Sorry for the big screenshot, but it is the best way to understand the issue.
image

@sebastianbergmann
Copy link
Owner

Is this a php-code-coverage issue or an issue with phpcov?

@thewholelifetolearn
Copy link
Author

I suppose that it comes from phpcov. It is phpcov that comes out with the statistics. The PHP coverage file created by PHPUnit seems correct. The lines marked as red are indeed not tested.
For me, the issue comes from phpcov. How can I verify that?

@sebastianbergmann
Copy link
Owner

phpcov is merely a CLI frontend for the php-code-coverage library. Do you get the same output if you only use PHPUnit and not phpcov?

@thewholelifetolearn
Copy link
Author

It seems that it comes from phpcov. PHPUnit gives a better result:

image

Generated by php-code-coverage 7.0.3 using PHP 7.3.3 with Xdebug 2.7.0 and PHPUnit 8.0.6 at Wed Apr 3 16:46:24 CEST 2019.

@thewholelifetolearn
Copy link
Author

But as I mentioned in issue #88 , the calculation method are different.

@sebastianbergmann
Copy link
Owner

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.

@thewholelifetolearn
Copy link
Author

I'm at the moment in holidays. I will try to submit a test case before end of May.

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 29, 2019
@thewholelifetolearn
Copy link
Author

I'm sorry i didn't propose a test case yet. I will propose one this month. I should have more spare time to do that.

@stale stale bot removed the wontfix label Jul 1, 2019
@sebastianbergmann
Copy link
Owner

No feedback, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants