23 lines
990 B
PHP
23 lines
990 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Support\RbacReason;
|
|
|
|
it('translates manual RBAC assignment reasons into operator guidance', function (): void {
|
|
$envelope = RbacReason::ManualAssignmentRequired->toReasonResolutionEnvelope();
|
|
|
|
expect($envelope->operatorLabel)->toBe('Manual role assignment required')
|
|
->and($envelope->actionability)->toBe('prerequisite_missing')
|
|
->and($envelope->shortExplanation)->toContain('manual Intune RBAC role assignment')
|
|
->and($envelope->guidanceText())->toBe('Next step: Complete the Intune role assignment manually, then refresh RBAC status.');
|
|
});
|
|
|
|
it('marks unsupported RBAC API cases as diagnostic-only operator states', function (): void {
|
|
$envelope = RbacReason::UnsupportedApi->toReasonResolutionEnvelope();
|
|
|
|
expect($envelope->actionability)->toBe('non_actionable')
|
|
->and($envelope->operatorLabel)->toBe('RBAC API unsupported')
|
|
->and($envelope->guidanceText())->toBe('No action needed.');
|
|
});
|