Skip to content

Commit 812f24d

Browse files
test(crl): empty URL list returns DISABLED when validation is off
Update the data-provider case that previously asserted NO_URLS regardless of the toggle setting, and add a dedicated test confirming that empty URL lists still return NO_URLS when external validation is enabled. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 98a3c35 commit 812f24d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

tests/php/Unit/Service/Crl/CrlRevocationCheckerTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,23 @@ public static function dataProviderCrlExternalValidationDisabled(): array {
157157
],
158158
'empty URL list' => [
159159
[],
160-
CrlValidationStatus::NO_URLS,
161-
'Empty URL list should always return no_urls regardless of setting',
160+
CrlValidationStatus::DISABLED,
161+
'Empty URL list should return disabled when external validation is off',
162162
],
163163
];
164164
}
165165

166+
public function testValidateReturnsNoUrlsForEmptyListWhenSettingOn(): void {
167+
$this->appConfig
168+
->method('getValueBool')
169+
->with(Application::APP_ID, 'crl_external_validation_enabled', true)
170+
->willReturn(true);
171+
172+
$result = $this->checker->validate([], '');
173+
174+
$this->assertSame(CrlValidationStatus::NO_URLS, $result['status'], 'Empty URL list should return no_urls when external validation is on');
175+
}
176+
166177
public function testValidateDoesNotReturnDisabledWhenSettingOn(): void {
167178
$this->appConfig
168179
->method('getValueBool')

0 commit comments

Comments
 (0)