File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use KaririCode \Sanitizer \Exception \InvalidRuleException ;
88use KaririCode \Sanitizer \Exception \SanitizationException ;
9- use PHPUnit \Framework \Attributes \CoversClass ;
109use PHPUnit \Framework \Attributes \Test ;
1110use PHPUnit \Framework \TestCase ;
1211
13- #[CoversClass(InvalidRuleException::class)]
14- #[CoversClass(SanitizationException::class)]
12+ // NOTE: #[CoversClass] is intentionally omitted for exception classes.
13+ // In PHPUnit 12 + pcov, classes that directly extend \RuntimeException
14+ // (a native PHP class) are reported as "not a valid target for code coverage",
15+ // which triggers PHPUnit warnings that — with failOnWarning="true" — exit as code 1.
16+ // Coverage for these classes is achieved transitively via SanitizerEngineTest and others.
1517final class SanitizationExceptionsTest extends TestCase
1618{
1719 #[Test]
You can’t perform that action at this time.
0 commit comments