Commit 31f3b62
committed
test(exceptions): remove #[CoversClass] from exception test to fix PHPUnit 12 CI warning
In PHPUnit 12 + pcov, classes that directly extend a native PHP class
(\RuntimeException) are reported as 'not a valid target for code coverage'.
This generates 4 PHPUnit warnings — one per test method — which with the
devkit-generated failOnWarning="true" in phpunit.xml.dist cause exit code 1,
blocking the CI pipeline despite 100% coverage and 175 passing tests.
Fix: remove #[CoversClass(InvalidRuleException::class)] and
#[CoversClass(SanitizationException::class)] from SanitizationExceptionsTest.
Coverage for both exception classes is still achieved transitively via
SanitizerEngineTest, InMemoryRuleRegistryTest, and integration tests.1 parent cd24e72 commit 31f3b62
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments