TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec426ExchangeTeamsNoRestoreTest.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

36 lines
1.4 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;
use App\Support\TenantConfiguration\IdentityState;
use App\Support\TenantConfiguration\RestoreTier;
it('Spec426 keeps selected Exchange and Teams readiness separate from restore readiness', 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->restore_tier)->not->toBe(RestoreTier::Restorable)
->and(app(ClaimGuard::class)->evaluate(
scopeKey: 'spec426_exchange_teams_internal',
requestedLevel: CoverageLevel::Renderable,
actualLevel: CoverageLevel::Renderable,
scopeComplete: true,
sourceClass: $row->source_class,
restoreTier: $row->restore_tier,
identityState: IdentityState::Stable,
restoreClaim: true,
))->toBe(ClaimState::ClaimBlocked);
}
});