TenantAtlas/apps/platform/tests/Unit/Support/TenantConfiguration/Spec422ExchangeTeamsClaimGuardTest.php
ahmido 13d363c8b8 feat: complete spec 422 exchange teams comparable renderable pack (#489)
## Summary

This PR completes spec 422 exchange teams comparable renderable pack with comparable diffing, renderable summary builders, and comprehensive test updates.

## Commit
- 4c1e14c6 feat: complete spec 422 exchange teams comparable renderable pack

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #489
2026-06-30 04:20:13 +00: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',
]);