-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
Description
| Q | A |
|---|---|
| PHPUnit version | 12.0.1 |
| PHP version | 8.4.2 |
| Installation Method | Composer |
| Code coverage | XDebug 3.4.0 |
Summary
Unable to configure code coverage for Enums.
Current behavior
When configuring coverage or usage using coversClass or usesClass attributes it gives me the following error:
Class ..... is not a valid target for code coverage
I tried configuring coverage using coversNamespace but got a similar error.
How to reproduce
Create an Enum and try to configure coverage in a TestCase.
Expected behavior
I can configure coverage for an Enum on my TestCases.
Maybe with specific attributes like coversEnum and usesEnum, but the ...Class attributes might work just fine if they accept enums.