not->toBeFalse(); foreach ($forbiddenPatterns as $pattern) { if (preg_match($pattern, (string) $contents) === 1) { $violations[] = $relativePath; break; } } } expect($violations) ->toBeEmpty('Canonical admin surfaces must delegate tenant resolution to OperateHubShell. Offenders: '.implode(', ', $violations)); }); it('documents the approved panel-native exception inventory', function (): void { $notes = file_get_contents(base_path('docs/research/canonical-tenant-context-resolution.md')); expect($notes)->not->toBeFalse(); foreach (adminTenantResolverExceptionFiles() as $relativePath) { expect($notes)->toContain($relativePath); } }); it('keeps the mixed-surface entra group resource explicit about admin and tenant-panel resolution', function (): void { $contents = file_get_contents(base_path('app/Filament/Resources/EntraGroupResource.php')); expect($contents)->not->toBeFalse() ->and($contents)->toContain('activeEntitledTenant(request())') ->and($contents)->toContain('Tenant::current()'); });