TenantAtlas/apps/platform/tests/Unit/Support/TenantConfiguration/Spec421EntraClaimGuardTest.php
Ahmed Darrazi 19037e1dd8
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m15s
feat: complete spec 421 Entra comparable/renderable pack
2026-06-27 23:42:58 +02:00

26 lines
986 B
PHP

<?php
declare(strict_types=1);
use App\Services\TenantConfiguration\ClaimGuard;
use App\Support\TenantConfiguration\ClaimState;
it('Spec421 allows scoped internal Entra comparable and renderable wording only as internal operator truth', function (string $claim): void {
expect(app(ClaimGuard::class)->evaluateStatement($claim, internalOperatorOnly: true))
->toBe(ClaimState::InternalOnly);
})->with([
'Selected Entra resources are comparable for internal operator review',
'Selected Entra resources are renderable for internal review',
]);
it('Spec421 blocks unsafe Entra and M365 overclaims', function (string $claim): void {
expect(app(ClaimGuard::class)->evaluateStatement($claim, internalOperatorOnly: true))
->toBe(ClaimState::ClaimBlocked);
})->with([
'Entra certified coverage',
'Entra restore-ready coverage',
'All Entra resources are supported',
'100 percent Entra coverage',
'Microsoft 365 customer-ready evidence',
]);