TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec420M365NoLegacyTest.php
Ahmed Darrazi 9405058433
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 5m46s
feat: complete m365 generic evidence coverage pack
2026-06-27 13:00:22 +02:00

41 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
use App\Support\TenantConfiguration\CaptureOutcome;
it('Spec420 adds no legacy coverage adapters or M365 mini-platform services', function (): void {
$files = [
app_path('Services/TenantConfiguration/CoverageSourceContractResolver.php'),
app_path('Services/TenantConfiguration/CoverageIdentityStrategyRegistry.php'),
app_path('Services/TenantConfiguration/GenericContentEvidenceCaptureService.php'),
app_path('Jobs/TenantConfiguration/CaptureTenantConfigurationEvidenceJob.php'),
];
$content = collect($files)
->map(fn (string $file): string => file_get_contents($file) ?: '')
->implode("\n");
expect($content)
->not->toContain('tenant_configuration.m365_capture')
->not->toContain('ProviderV1')
->not->toContain('LegacyAdapter')
->not->toContain('fallback_reader')
->not->toContain('dual_write')
->not->toContain('namespace App\\Services\\TenantConfiguration\\Entra')
->not->toContain('namespace App\\Services\\TenantConfiguration\\Exchange')
->not->toContain('namespace App\\Services\\TenantConfiguration\\Teams')
->not->toContain('namespace App\\Services\\TenantConfiguration\\SecurityCompliance')
->not->toContain('Http::');
foreach ([
'policy_record_missing',
'foundation_not_policy_backed',
'meta_fallback',
'ambiguous_match',
'raw_gap_count',
] as $legacyOutcome) {
expect(CaptureOutcome::values())->not->toContain($legacyOutcome);
}
});