61 lines
2.3 KiB
PHP
61 lines
2.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Services\TenantConfiguration\ClaimGuard;
|
|
use App\Services\TenantConfiguration\EntraCertifiedComparePackEvaluator;
|
|
use App\Support\TenantConfiguration\ClaimState;
|
|
|
|
it('Spec425 allows exact denominator-visible certified pack wording only after the evaluator passes', function (): void {
|
|
$guard = app(ClaimGuard::class);
|
|
|
|
expect($guard->evaluateCertifiedComparePackStatement(
|
|
claim: EntraCertifiedComparePackEvaluator::CLAIM_LABEL,
|
|
packPassed: true,
|
|
internalOperatorOnly: true,
|
|
))->toBe(ClaimState::InternalOnly)
|
|
->and($guard->evaluateCertifiedComparePackStatement(
|
|
claim: EntraCertifiedComparePackEvaluator::CLAIM_LABEL,
|
|
packPassed: false,
|
|
internalOperatorOnly: true,
|
|
))->toBe(ClaimState::ClaimBlocked)
|
|
->and($guard->evaluateCertifiedComparePackStatement(
|
|
claim: EntraCertifiedComparePackEvaluator::CLAIM_LABEL,
|
|
packPassed: true,
|
|
internalOperatorOnly: false,
|
|
))->toBe(ClaimState::ClaimBlocked);
|
|
});
|
|
|
|
it('Spec425 blocks certified pack wording when the denominator is omitted', function (): void {
|
|
expect(app(ClaimGuard::class)->evaluateCertifiedComparePackStatement(
|
|
claim: 'Certified Entra Core Compare Pack',
|
|
packPassed: true,
|
|
internalOperatorOnly: true,
|
|
))->toBe(ClaimState::ClaimBlocked);
|
|
});
|
|
|
|
it('Spec425 blocks broad restore customer Microsoft 365 and legal certification overclaims', function (string $claim): void {
|
|
expect(app(ClaimGuard::class)->evaluateCertifiedComparePackStatement(
|
|
claim: $claim,
|
|
packPassed: true,
|
|
internalOperatorOnly: true,
|
|
))->toBe(ClaimState::ClaimBlocked);
|
|
})->with([
|
|
'Certified Entra coverage',
|
|
'100% Entra coverage',
|
|
'Full Entra coverage',
|
|
'Entra restore-ready',
|
|
'Certified Microsoft 365 coverage',
|
|
'Customer-ready Entra proof',
|
|
'Full tenant security proof',
|
|
'Legal attestation for Entra coverage',
|
|
'Review Pack proof for Entra',
|
|
]);
|
|
|
|
it('Spec425 keeps existing generic certification claims conservative by default', function (): void {
|
|
expect(app(ClaimGuard::class)->evaluateStatement(
|
|
EntraCertifiedComparePackEvaluator::CLAIM_LABEL,
|
|
internalOperatorOnly: true,
|
|
))->toBe(ClaimState::ClaimBlocked);
|
|
});
|