## Summary - consolidate internal platform naming from `Tenant` to `Environment` / `ManagedEnvironment` across models, controllers, services, and Filament resources - rename environment-scoped UI surfaces such as dashboards, chooser flows, navigation, and related widgets to match the updated environment-first domain language - align middleware, onboarding/review lifecycle services, jobs, and route/context controllers with the new environment-scoped architecture ## Validation - not rerun as part of this commit/push/PR request ## Notes - branch is 1 commit ahead of `platform-dev` - main commit: `refactor: consolidate internal tenant model naming` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #355
38 lines
1.7 KiB
PHP
38 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\File;
|
|
|
|
it('keeps verification tab ownership inside the shared viewer', function (): void {
|
|
$sharedViewer = (string) file_get_contents(resource_path('views/filament/components/verification-report-viewer.blade.php'));
|
|
|
|
expect($sharedViewer)
|
|
->toContain('data-shared-detail-family="verification-report"')
|
|
->toContain('Verification report tabs');
|
|
|
|
$hostViews = [
|
|
resource_path('views/filament/forms/components/managed-environment-onboarding-verification-report.blade.php'),
|
|
resource_path('views/filament/widgets/managed-environment/managed-environment-verification-report.blade.php'),
|
|
];
|
|
|
|
foreach ($hostViews as $path) {
|
|
expect((string) file_get_contents($path))->not->toContain('Verification report tabs');
|
|
}
|
|
});
|
|
|
|
it('keeps policy-settings-standard as a compatibility wrapper only', function (): void {
|
|
$compatibilityView = (string) file_get_contents(resource_path('views/filament/infolists/entries/policy-settings-standard.blade.php'));
|
|
|
|
expect($compatibilityView)->toContain('normalized-settings.wrapper');
|
|
|
|
$directUsages = collect(File::allFiles(resource_path('views/filament')))
|
|
->reject(static fn (\SplFileInfo $file): bool => $file->getPathname() === resource_path('views/filament/infolists/entries/policy-settings-standard.blade.php'))
|
|
->filter(static fn (\SplFileInfo $file): bool => str_contains((string) file_get_contents($file->getPathname()), 'policy-settings-standard'))
|
|
->map(static fn (\SplFileInfo $file): string => str_replace(resource_path('views/'), '', $file->getPathname()))
|
|
->values()
|
|
->all();
|
|
|
|
expect($directUsages)->toBe([]);
|
|
});
|