chore: remove login method setting
This commit is contained in:
@@ -11,7 +11,6 @@ test('settings expose secure defaults from plugin-settings.conf', function (): v
|
||||
assert_true($settings->ipMask());
|
||||
assert_same('MASKED', $settings->auditClientIp('198.51.100.10'));
|
||||
assert_true($settings->defaultEnable());
|
||||
assert_same('login_url', $settings->method());
|
||||
assert_same('root', $settings->sshUser());
|
||||
assert_same('https://mx1.mojserwer.pl:2222', $settings->targetBaseUrl());
|
||||
});
|
||||
@@ -77,14 +76,15 @@ test('settings do not expose mx helper mode', function (): void {
|
||||
assert_not_contains('MX_LOGIN_MODE', $config);
|
||||
});
|
||||
|
||||
test('settings reject disabled plugin and unsupported methods through access guard', function (): void {
|
||||
try {
|
||||
Settings::fromArray(['MAIL_LOGIN_METHOD' => 'password']);
|
||||
throw new RuntimeException('Expected unsupported method to fail');
|
||||
} catch (InvalidArgumentException $e) {
|
||||
assert_contains('MAIL_LOGIN_METHOD', $e->getMessage());
|
||||
}
|
||||
test('settings do not expose deprecated mail login method switch', function (): void {
|
||||
$defaults = Settings::defaults();
|
||||
$config = file_get_contents(PLUGIN_ROOT . '/plugin-settings.conf') ?: '';
|
||||
|
||||
assert_false(array_key_exists('MAIL_LOGIN_METHOD', $defaults));
|
||||
assert_not_contains('MAIL_LOGIN_METHOD', $config);
|
||||
});
|
||||
|
||||
test('settings expose disabled plugin flag through access guard', function (): void {
|
||||
$settings = Settings::fromArray(['DEFAULT_ENABLE' => 'false']);
|
||||
assert_false($settings->defaultEnable());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user