41 lines
2.2 KiB
PHP
41 lines
2.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Services\TenantConfiguration\ClaimGuard;
|
|
use App\Support\TenantConfiguration\ClaimState;
|
|
|
|
it('Spec419 blocks broad M365 customer claims', function (string $claim): void {
|
|
expect((new ClaimGuard)->evaluateStatement($claim))->toBe(ClaimState::ClaimBlocked);
|
|
})->with([
|
|
'100 percent Microsoft 365' => '100% Microsoft 365 coverage',
|
|
'100 percent M365' => '100% M365 coverage',
|
|
'full M365' => 'Full M365 coverage',
|
|
'full Microsoft 365' => 'Full Microsoft 365 coverage',
|
|
'certified M365' => 'Certified M365 coverage',
|
|
'M365 certified' => 'M365 certified coverage',
|
|
'certified Microsoft 365' => 'Certified Microsoft 365 coverage',
|
|
'Microsoft 365 certified' => 'Microsoft 365 certified coverage',
|
|
'certified coverage across M365' => 'Certified coverage across M365',
|
|
'restore ready M365' => 'Restore-ready M365 coverage',
|
|
'M365 restore ready' => 'M365 restore-ready coverage',
|
|
'restore ready Microsoft 365' => 'Restore ready Microsoft 365 coverage',
|
|
'complete tenant' => 'Complete tenant coverage',
|
|
'full tenant' => 'Full tenant coverage',
|
|
'all Microsoft 365 resources' => 'All Microsoft 365 resources supported',
|
|
'M365 all resources' => 'M365 all resources supported',
|
|
'all TCM resources' => 'All TCM resources certified',
|
|
'certified seeded registry' => 'Certified registry coverage for seeded Entra resource type entries',
|
|
'restore ready seeded registry' => 'Restore-ready registry coverage for seeded Entra resource type entries',
|
|
]);
|
|
|
|
it('Spec419 permits only internal registry-scoped denominator wording', function (): void {
|
|
$guard = new ClaimGuard;
|
|
$statement = '100% registry coverage for seeded Entra resource type entries';
|
|
|
|
expect($guard->evaluateStatement($statement))->toBe(ClaimState::ClaimBlocked)
|
|
->and($guard->evaluateStatement($statement, internalOperatorOnly: true))->toBe(ClaimState::InternalOnly)
|
|
->and($guard->evaluateStatement('Detected registry coverage for seeded Exchange resource type entries', internalOperatorOnly: true))->toBe(ClaimState::InternalOnly)
|
|
->and($guard->evaluateStatement('Detected registry coverage for seeded Exchange resource type entries'))->toBe(ClaimState::ClaimBlocked);
|
|
});
|