Replaced legacy tenant and environment bindings in the BaselineDriftEngine with the new ProviderResourceIdentity framework as defined in Spec 382. This ensures cross-environment compatibility and deterministic baseline matching. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #453
25 lines
1.0 KiB
PHP
25 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Services\Baselines\Matching\FoundationCoverageResolver;
|
|
use App\Support\Resources\ResourceIdentity;
|
|
|
|
it('classifies foundation inventory-only and canonical-only coverage through the existing support contract', function (): void {
|
|
$resolver = app(FoundationCoverageResolver::class);
|
|
|
|
$inventoryOnly = $resolver->coverageFor('roleScopeTag');
|
|
$canonicalOnly = $resolver->coverageFor(
|
|
'roleScopeTag',
|
|
ResourceIdentity::canonicalBuiltin('fake-provider', 'scope-tag', 'default'),
|
|
);
|
|
$unsupported = $resolver->coverageFor('intuneRoleAssignment');
|
|
|
|
expect($inventoryOnly['coverage'])->toBe('inventory_only')
|
|
->and($inventoryOnly['reason_code'])->toBe('foundation_not_policy_backed')
|
|
->and($canonicalOnly['coverage'])->toBe('canonical_only')
|
|
->and($canonicalOnly['identity_kind'])->toBe(ResourceIdentity::CanonicalBuiltin)
|
|
->and($unsupported['coverage'])->toBe('unsupported')
|
|
->and($unsupported['reason_code'])->toBe('unsupported_subject');
|
|
});
|