Files
alrahma_sunday_school_api/tests/Feature/Api/V1/FullSurface/ApiBatch16RouteGraphInvariantRegisterTest.php
T
2026-06-09 01:03:53 -04:00

30 lines
1.4 KiB
PHP

<?php
namespace Tests\Feature\Api\V1\FullSurface;
use Tests\Feature\Api\V1\FullSurface\Support\FullSurfaceE2EContractCase;
class ApiBatch16RouteGraphInvariantRegisterTest extends FullSurfaceE2EContractCase
{
public function test_batch16_route_graph_has_contract_pressure_for_new_risk_families(): void
{
$riskFamilies = [
'workflow-compensation' => ['enroll', 'assign', 'promotion', 'withdraw'],
'eventual-consistency' => ['send', 'dispatch', 'notify', 'import', 'export'],
'optimistic-locking' => ['students', 'users', 'attendance', 'scores', 'finance'],
'money-precision' => ['finance', 'invoice', 'payment', 'refund', 'fee'],
'temporal-consistency' => ['attendance', 'calendar', 'school-year', 'semester'],
'device-trust' => ['scanner', 'scan', 'kiosk', 'badge', 'device'],
'import-preview' => ['import', 'upload', 'preview', 'commit', 'bulk'],
'notification-suppression' => ['notify', 'notification', 'email', 'whatsapp'],
];
foreach ($riskFamilies as $family => $needles) {
$this->assertNotEmpty(
$this->apiRoutesContainingAny($needles),
'Batch 16 risk family '.$family.' should map to at least one registered API route or be consciously removed from the risk register.'
);
}
}
}