fix: harden sessions and domain validation
This commit is contained in:
@@ -13,6 +13,9 @@ if (calculate_duration_hours(null, null, 1.25) !== 1.25) {
|
||||
if (calculate_duration_hours('11:30', '09:00') !== null) {
|
||||
throw new RuntimeException('Expected invalid reverse time to be rejected');
|
||||
}
|
||||
if (calculate_duration_hours(null, null, 0.0) !== null) {
|
||||
throw new RuntimeException('Expected zero manual hours to be rejected');
|
||||
}
|
||||
$sla = calculate_sla_usage(20.0, [2.0, 1.5, 1.0]);
|
||||
if ($sla !== ['used' => 4.5, 'remaining' => 15.5, 'percentage' => 22.5, 'status' => 'within_limit']) {
|
||||
throw new RuntimeException('Unexpected SLA calculation: ' . json_encode($sla));
|
||||
|
||||
Reference in New Issue
Block a user