File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,29 @@ public function testBitcoin(): void
304304 self ::assertSame ('256.00000256000000000000000000000001 ' , $ user ->balanceFloat );
305305 }
306306
307+ /**
308+ * Case from @EdX9.
309+ *
310+ * @see https://github.com/bavix/laravel-wallet/issues/469
311+ *
312+ * @throws ExceptionInterface
313+ */
314+ public function testBigFloat (): void
315+ {
316+ /** @var User[] $users */
317+ $ users = UserFloatFactory::times (2 )->create ();
318+
319+ [$ first , $ second ] = $ users ;
320+
321+ self ::assertSame (0 , $ first ->balanceInt );
322+ self ::assertSame (0 , $ second ->balanceInt );
323+
324+ $ first ->forceTransferFloat ($ second , 6629944401 );
325+
326+ self ::assertSame (-662994440100 , $ first ->balanceInt );
327+ self ::assertSame (662994440100 , $ second ->balanceInt );
328+ }
329+
307330 /**
308331 * Case from @ucanbehack.
309332 *
You can’t perform that action at this time.
0 commit comments