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

29 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Illuminate\Support\Facades\Schema;
it('Spec420 keeps Coverage v2 ownership on workspace and managed environment, not tenant_id', function (): void {
foreach ([
'tenant_configuration_resources',
'tenant_configuration_resource_evidence',
'tenant_configuration_resource_types',
'tenant_configuration_supported_scopes',
] as $table) {
expect(Schema::getColumnListing($table))->not->toContain('tenant_id');
}
$source = collect([
app_path('Services/TenantConfiguration/CoverageSourceContractResolver.php'),
app_path('Services/TenantConfiguration/GenericContentEvidenceCaptureService.php'),
app_path('Services/TenantConfiguration/CoverageResourceUpserter.php'),
app_path('Services/TenantConfiguration/CoverageEvidenceWriter.php'),
app_path('Services/TenantConfiguration/StartTenantConfigurationCapture.php'),
app_path('Jobs/TenantConfiguration/CaptureTenantConfigurationEvidenceJob.php'),
])->map(fn (string $file): string => file_get_contents($file) ?: '')
->implode("\n");
expect($source)->not->toContain('tenant_id');
});