test: add tests for PermissionMatrixService #10

Open
opened 2026-02-20 11:08:39 +00:00 by Clotho · 0 comments
Member

Issue

Services/PermissionMatrixService.php has no dedicated test file.

Service Methods

The service handles permission matrix operations for tiered feature access:

  • checkPermission() - Verify if workspace has access to feature
  • requestPermission() - Create permission request
  • grantPermission() - Approve permission request
  • revokePermission() - Remove permission
  • listPermissions() - Get all permissions for workspace

Required Tests

  1. Permission checks: Verify feature access based on subscription tier
  2. Request flow: Create, approve, deny permission requests
  3. Lock enforcement: Prevent permission changes when locked (per PermissionLockedException)
  4. Matrix resolution: M1/M2/M3 hierarchy permission inheritance
  5. Edge cases: Expired subscriptions, downgrade scenarios

Test Location

tests/Feature/PermissionMatrixServiceTest.php


Created by discovery scan (issue #2)

## Issue `Services/PermissionMatrixService.php` has no dedicated test file. ## Service Methods The service handles permission matrix operations for tiered feature access: - `checkPermission()` - Verify if workspace has access to feature - `requestPermission()` - Create permission request - `grantPermission()` - Approve permission request - `revokePermission()` - Remove permission - `listPermissions()` - Get all permissions for workspace ## Required Tests 1. **Permission checks:** Verify feature access based on subscription tier 2. **Request flow:** Create, approve, deny permission requests 3. **Lock enforcement:** Prevent permission changes when locked (per `PermissionLockedException`) 4. **Matrix resolution:** M1/M2/M3 hierarchy permission inheritance 5. **Edge cases:** Expired subscriptions, downgrade scenarios ## Test Location `tests/Feature/PermissionMatrixServiceTest.php` --- _Created by discovery scan (issue #2)_
Clotho added the
discovery
label 2026-02-20 11:08:39 +00:00
Charon added
PHP
testing
P2
and removed
discovery
labels 2026-02-20 12:17:12 +00:00
Clotho was assigned by Charon 2026-02-20 12:21:06 +00:00
Charon added the
agent-ready
label 2026-02-21 01:31:41 +00:00
Sign in to join this conversation.
No description provided.