Commit 7cba332
committed
fix(tests): replace UsesClass with CoversClass for DiscoveryException
PHPUnit 12 with beStrictAboutCoverageMetadata emits a warning when
#[UsesClass] targets a class that cannot be instrumented.
DiscoveryException extends \RuntimeException (a PHP built-in), which
PCOV cannot fully instrument via UsesClass semantics.
- DiscoveryExceptionTest: UsesClass → CoversClass (the test directly
exercises DiscoveryException, so CoversClass is correct).
- DirectoryScannerTest: UsesClass(DiscoveryException) → CoversClass
(testScanNonExistentPathThrowsException exercises the exception path).
Eliminates all 26 PHPUnit Warnings that were failing the CI pipeline.1 parent 806b421 commit 7cba332
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments