Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x#38054
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
sanmai commentedSep 4, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I think I addressed all comments. How should I test this change? I seethere's a test, but it assumes a currently used version of PHPUnit. Should this be enough? |
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I see there's a test, but it assumes a currently used version of PHPUnit. Should this be enough?
Yes, we're not going to test with multiple versions of phpunit.
fabpot commentedSep 4, 2020
Thank you@sanmai. |
derrabus commentedSep 4, 2020
Thank you for working on this issue,@sanmai! 🚀 |
…rait for PHPUnit 9.3 (sanmai, derrabus)This PR was merged into the 3.4 branch.Discussion----------[PhpUnitBridge] Adjust output parsing of CoverageListenerTrait for PHPUnit 9.3| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |#37637,#37564| License | MIT| Doc PR | N/AThis PR makes `CoverageListenerTrait` pass with PHPUnit 9.3. It contains a backport of#38054.The problem that is addressed here is that a one of the fixture classes is now included in the output despite having a coverage of zero. The test now accepts both cases:* The class is omitted from the output* The class appears with 0.00% coverage.Commits-------a3831dc [PhpUnitBridge] Adjust output parsing for PHPUnit 9.3.99c98bd [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
…rait (sanmai)This PR was squashed before being merged into the 4.4 branch.Discussion----------[PhpUnitBridge] Skip internal classes in CoverageListenerTraitPHPUnit 9+ is picky about test covering, say, a `\RuntimeException`. Fails with the likes: "@Covers RuntimeException" is invalidJudging by the commitsebastianbergmann/phpunit@e06850c this change is required for PHPUnit 9.1 and up. [Here's it being tested.](https://github.com/sebastianbergmann/code-unit/blob/60c6fb972b3262e423be3000e7b8c67cbc477580/tests/unit/ClassMethodUnitTest.php#L49-L54)| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | Follow-up to#38054| License | MITCommits-------a0dedb9 [PhpUnitBridge] Skip internal classes in CoverageListenerTrait
Uh oh!
There was an error while loading.Please reload this page.
Updated to use
PHPUnit\Util\Annotation\Registryand related classes.Fixes#37637
If this is a sensible approach, I will try to add a test for this addition.