fix: harden sessions and domain validation
This commit is contained in:
@@ -29,5 +29,5 @@ if ($nonNumericEntry['valid'] || !isset($nonNumericEntry['errors']['hours'])) th
|
||||
|
||||
$aggregator = new TimeAggregator();
|
||||
if ($aggregator->total([['hours' => 2.25], ['hours' => 1.5], ['hours' => -4]]) !== 3.75) throw new RuntimeException('Expected positive time aggregation.');
|
||||
if ($aggregator->slaTotal([['hours' => 2, 'counts_toward_sla' => true], ['hours' => 3, 'counts_toward_sla' => false]]) !== 2.0) throw new RuntimeException('Expected SLA-filtered aggregation.');
|
||||
if ($aggregator->slaTotal([['hours' => 2, 'counts_toward_sla' => true], ['hours' => 3, 'counts_toward_sla' => false], ['hours' => 1, 'counts_toward_sla' => 1]]) !== 3.0) throw new RuntimeException('Expected SLA-filtered aggregation.');
|
||||
printf("Jobcard domain tests: 12 passed\n");
|
||||
|
||||
Reference in New Issue
Block a user