TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec420M365NoLegacyTest.php
ahmido a73a8f5882 feat: complete m365 generic evidence coverage pack (#487)
Committing and publishing the current Spec 420 package changes.

Includes updated services, coverage tests, browser smoke coverage, and the spec/plan/tasks artifacts for the package.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #487
2026-06-27 12:24:00 +00: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);
}
});