TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec425EntraCertifiedNoCustomerClaimTest.php
ahmido 33e496c182 feat: complete spec 425 enta certified compare pack (#492)
Implements spec 425 with Entra certified compare pack support, coverage, guards, evaluator, fixtures, and tests.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #492
2026-07-01 23:27:16 +00:00

28 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use App\Services\TenantConfiguration\EntraCertifiedComparePackEvaluator;
use Tests\Support\TenantConfiguration\Spec425Fixtures as Spec425;
it('Spec425 does not activate customer-facing claims or customer output paths', function (): void {
Spec425::syncDefaults();
$runtimeFiles = [
app_path('Services/TenantConfiguration/EntraCertifiedComparePackEvaluator.php'),
app_path('Services/TenantConfiguration/EntraCertifiedComparePackResult.php'),
app_path('Services/TenantConfiguration/SupportedScopeResolver.php'),
app_path('Services/TenantConfiguration/ClaimGuard.php'),
];
$runtime = implode("\n", array_map(static fn (string $path): string => file_get_contents($path) ?: '', $runtimeFiles));
$scope = collect(\App\Services\TenantConfiguration\SupportedScopeResolver::defaultDefinitions())
->firstWhere('scope_key', EntraCertifiedComparePackEvaluator::SCOPE_KEY);
expect($scope['customer_claims_allowed'])->toBeFalse()
->and($scope['metadata']['claim_surface'])->toBe('internal_operator_only')
->and($runtime)->not->toContain('ReviewPack')
->and($runtime)->not->toContain('ManagementReport')
->and($runtime)->not->toContain('CustomerOutputGate')
->and($runtime)->not->toContain('customer-ready');
});