TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec426ExchangeTeamsNoCertificationTest.php
ahmido f7d06621a0 feat: implement Exchange Teams evidence identity readiness (#493)
Automated PR for spec 426 exchange teams core evidence identity readiness. Includes service changes and coverage/requirement/spec updates from commit fb4dc20c.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #493
2026-07-03 11:43:11 +00:00

30 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use App\Models\TenantConfigurationResourceType;
use App\Services\TenantConfiguration\ClaimGuard;
use App\Services\TenantConfiguration\ResourceTypeRegistry;
use App\Support\TenantConfiguration\ClaimState;
use App\Support\TenantConfiguration\CoverageLevel;
it('Spec426 does not certify selected Exchange and Teams readiness rows or wording', function (): void {
app(ResourceTypeRegistry::class)->syncDefaults();
$rows = TenantConfigurationResourceType::query()
->whereIn('canonical_type', ['transportRule', 'acceptedDomain', 'appPermissionPolicy', 'meetingPolicy'])
->get();
expect($rows)->toHaveCount(4);
foreach ($rows as $row) {
expect($row->allows_certified_claims)->toBeFalse()
->and($row->default_coverage_level)->not->toBe(CoverageLevel::Certified);
}
expect(app(ClaimGuard::class)->evaluateStatement('Selected Exchange resources are certified', internalOperatorOnly: true))
->toBe(ClaimState::ClaimBlocked)
->and(app(ClaimGuard::class)->evaluateStatement('Selected Teams resources are certified', internalOperatorOnly: true))
->toBe(ClaimState::ClaimBlocked);
});