TenantAtlas/tests/Feature/OpsUx/OperationSummaryKeysSpecTest.php
2026-01-18 14:44:16 +01:00

19 lines
632 B
PHP

<?php
use App\Support\OpsUx\OperationSummaryKeys;
it('matches the canonical summary keys declared in spec.md', function () {
$specPath = base_path('specs/055-ops-ux-rollout/spec.md');
$spec = file_get_contents($specPath);
// Extract the backtick-enclosed comma-separated canonical list from spec.md
$matched = preg_match('/The following keys are the ONLY allowed summary keys[\s\S]*?`([^`]*)`/i', $spec, $m);
expect($matched)->toBeTruthy();
$specList = array_map('trim', explode(',', $m[1]));
$codeList = OperationSummaryKeys::all();
expect($codeList)->toEqual($specList);
})->group('ops-ux');