TenantAtlas/apps/platform/tests/Unit/Support/TenantConfiguration/Spec422ExchangeTeamsClaimGuardTest.php
Ahmed Darrazi 4c1e14c6bc
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 6m9s
feat: complete spec 422 exchange teams comparable renderable pack
2026-06-30 06:18:15 +02:00

54 lines
2.1 KiB
PHP

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