-
-
Notifications
You must be signed in to change notification settings - Fork 377
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 annotations are ignored/misinterpreted #806
Comments
I am afraid this is a bit too minimal as it is missing a |
My bad. I have to say, though, that this is a rather unusual location. At least I expect |
My reasoning for putting configuration XML under |
This seems to have been already fixed by #807:
diff --git a/composer.json b/composer.json
index 0b36d27..d879ba8 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,8 @@
"php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "~9.3"
+ "phpunit/phpunit": "~9.3",
+ "phpunit/php-code-coverage": "dev-master"
},
"autoload" : {
"psr-4": { "Demo\\": "src/" }
|
Since upgrade from PHPUnit 9.2 to 9.3 there are few issues with code coverage:
"This test executed code that is not listed as code to be covered or used:" is thrown even if valid annotation is present
Code coverage calculation seems to take unproductive lines into calculation. Like empty exception classes or code surrounding productive lines. The code at a screenshot below has coverage of 80% even though all productive lines are covered:
My configuration file contains following non-default values:
<coverage>
node contains no option overrides.Test suite is executed using following command:
I have set up a minimal, self-contained example reproducing both issues here https://github.com/LlZARD/phpunit-demo
I would gladly contribute and provide a PR if you will give me a hint what can be done here.
The text was updated successfully, but these errors were encountered: