refactor(tests): remove redundant tests and fix assertion style
Remove subset/duplicate architecture tests already covered by broader checks, and replace assertTrue(true) with self::addToAssertionCount(1) for explicit no-exception-thrown intent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ namespace MintyPHP\Service\Access;
|
||||
|
||||
class SettingsAuthorizationPolicy implements AuthorizationPolicyInterface
|
||||
{
|
||||
use AuthorizationPolicyContextTrait;
|
||||
|
||||
public const ABILITY_ADMIN_SETTINGS_VIEW = 'admin.settings.view';
|
||||
public const ABILITY_ADMIN_SETTINGS_UPDATE = 'admin.settings.update';
|
||||
public const ABILITY_ADMIN_SETTINGS_BRANDING_UPDATE = 'admin.settings.branding.update';
|
||||
@@ -63,13 +65,4 @@ class SettingsAuthorizationPolicy implements AuthorizationPolicyInterface
|
||||
return AuthorizationDecision::allow();
|
||||
}
|
||||
|
||||
private function actorUserId(array $context): int
|
||||
{
|
||||
return (int) ($context['actor_user_id'] ?? 0);
|
||||
}
|
||||
|
||||
private function hasPermission(int $userId, string $permissionKey): bool
|
||||
{
|
||||
return $userId > 0 && $this->permissionService->userHas($userId, $permissionKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user