Skip to content

Commit

Permalink
Test overflow with more iterations and debug infos
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Oct 4, 2024
1 parent 50c0e29 commit d9fa68e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/Carbon/SettersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class SettersTest extends AbstractTestCase
{
public const SET_UNIT_NO_OVERFLOW_SAMPLE = 200;
public const SET_UNIT_NO_OVERFLOW_SAMPLE = 20_000;

public function testMonthEnum()
{
Expand Down Expand Up @@ -670,6 +670,21 @@ public function testSetUnitNoOverflow()

if ($date < $start || $date > $end) {
$results['failure']++;
var_dump([
'year' => $year,
'month' => $month,
'day' => $day,
'hour' => $hour,
'minute' => $minute,
'second' => $second,
'microsecond' => $microsecond,
'valueUnit' => $valueUnit,
'value' => $value,
'overflowUnit' => $overflowUnit,
'date' => $date->format('Y-m-d H:i:s'),
'start' => $start->format('Y-m-d H:i:s'),
'end' => $end->format('Y-m-d H:i:s'),
]);

continue;
}
Expand Down

0 comments on commit d9fa68e

Please sign in to comment.