@@ -73,6 +73,10 @@ public function testItThrowsForInvalidFormatWithRepeatingPlaceholder(): void
7373 /**
7474 * @param array{days?: float|int, hours?: float|int, minutes?: float|int, seconds?: float|int, milliseconds?: float|int, microseconds?: float|int} $args
7575 */
76+ #[TestWith([
77+ [],
78+ 0 ,
79+ ])]
7680 #[TestWith([
7781 ['seconds ' => 987 , 'milliseconds ' => 654 , 'microseconds ' => 321 , 'nanoseconds ' => 123 ],
7882 987_654_321_123 ,
@@ -175,6 +179,8 @@ public function testItThrowsForDateTimeInterfaceDiffInterval(): void
175179 TimeSpan::fromInterval ($ interval );
176180 }
177181
182+ #[TestWith([0 , 0 ])]
183+ #[TestWith([0.0 , 0 ])]
178184 #[TestWith([100 , 100 ])]
179185 #[TestWith([100.1 , 100 ])]
180186 #[TestWith([100.5 , 101 ])]
@@ -190,6 +196,8 @@ public function testFromNanoseconds(int|float $nanoseconds, int $expected): void
190196 self ::assertSame ($ expected , $ span ->toNanoseconds ());
191197 }
192198
199+ #[TestWith([0 , 0 ])]
200+ #[TestWith([0.0 , 0 ])]
193201 #[TestWith([100 , 100 ])]
194202 #[TestWith([100.1 , 100 ])]
195203 #[TestWith([100.5 , 101 ])]
@@ -201,6 +209,8 @@ public function testFromMicroseconds(int|float $microseconds, int $expected): vo
201209 self ::assertSame ($ expected , $ span ->toMicroseconds ());
202210 }
203211
212+ #[TestWith([0 , 0 ])]
213+ #[TestWith([0.0 , 0 ])]
204214 #[TestWith([100 , 100_000 ])]
205215 #[TestWith([100.1 , 100_100 ])]
206216 #[TestWith([100.5 , 100_500 ])]
@@ -212,6 +222,8 @@ public function testFromMilliseconds(int|float $milliseconds, int $expected): vo
212222 self ::assertSame ($ expected , $ span ->toMicroseconds ());
213223 }
214224
225+ #[TestWith([0 , 0 ])]
226+ #[TestWith([0.0 , 0 ])]
215227 #[TestWith([100 , 100_000_000 ])]
216228 #[TestWith([100.1 , 100_100_000 ])]
217229 #[TestWith([100.5 , 100_500_000 ])]
@@ -223,6 +235,8 @@ public function testFromSeconds(int|float $seconds, int $expected): void
223235 self ::assertSame ($ expected , $ span ->toMicroseconds ());
224236 }
225237
238+ #[TestWith([0 , 0 ])]
239+ #[TestWith([0.0 , 0 ])]
226240 #[TestWith([100 , 6_000_000_000 ])]
227241 #[TestWith([100.1 , 6_006_000_000 ])]
228242 #[TestWith([100.5 , 6_030_000_000 ])]
@@ -234,6 +248,8 @@ public function testFromMinutes(int|float $minutes, int $expected): void
234248 self ::assertSame ($ expected , $ span ->toMicroseconds ());
235249 }
236250
251+ #[TestWith([0 , 0 ])]
252+ #[TestWith([0.0 , 0 ])]
237253 #[TestWith([100 , 360_000_000_000 ])]
238254 #[TestWith([100.1 , 360_360_000_000 ])]
239255 #[TestWith([100.5 , 361_800_000_000 ])]
@@ -245,6 +261,8 @@ public function testFromHours(int|float $hours, int $expected): void
245261 self ::assertSame ($ expected , $ span ->toMicroseconds ());
246262 }
247263
264+ #[TestWith([0 , 0 ])]
265+ #[TestWith([0.0 , 0 ])]
248266 #[TestWith([100 , 8_640_000_000_000_000 ])]
249267 #[TestWith([106751 , 9_223_286_400_000_000_000 ])]
250268 #[TestWith([-106751 , -9_223_286_400_000_000_000 ])]
0 commit comments