Skip to content

Commit fac9951

Browse files
mowens3claude
andcommitted
Achieve 100% test coverage
- Add all domain-specific codes to categoryProvider - Add all error codes to httpStatusProvider - Complete coverage for getCategory() and getHttpStatus() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9dda90f commit fac9951

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/ErrorCodeTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ public static function categoryProvider(): array {
6767
[ErrorCode::TIMEOUT, 'operation'],
6868
[ErrorCode::CONFIRMATION_REQUIRED, 'operation'],
6969

70-
// Domain category (default)
70+
// Domain category (all domain-specific codes)
7171
[ErrorCode::TEMPLATE_NOT_FOUND, 'domain'],
7272
[ErrorCode::CRON_FAILED, 'domain'],
7373
[ErrorCode::MIGRATION_FAILED, 'domain'],
74+
[ErrorCode::RECIPE_FAILED, 'domain'],
75+
[ErrorCode::CONFIG_ERROR, 'domain'],
76+
[ErrorCode::MEDIA_ERROR, 'domain'],
77+
[ErrorCode::SERVICE_UNAVAILABLE, 'domain'],
7478
];
7579
}
7680

@@ -131,9 +135,15 @@ public static function httpStatusProvider(): array {
131135
// 503 Service Unavailable
132136
[ErrorCode::SERVICE_UNAVAILABLE, 503],
133137

134-
// 500 Internal Server Error (default)
138+
// 500 Internal Server Error (default for operation/domain codes)
135139
[ErrorCode::INTERNAL_ERROR, 500],
136140
[ErrorCode::OPERATION_FAILED, 500],
141+
[ErrorCode::CONFIRMATION_REQUIRED, 500],
142+
[ErrorCode::CRON_FAILED, 500],
143+
[ErrorCode::MIGRATION_FAILED, 500],
144+
[ErrorCode::RECIPE_FAILED, 500],
145+
[ErrorCode::CONFIG_ERROR, 500],
146+
[ErrorCode::MEDIA_ERROR, 500],
137147
];
138148
}
139149

0 commit comments

Comments
 (0)