File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,6 @@ public function getCurrencyAttribute(): string
156156
157157 protected function initializeMorphOneWallet (): void
158158 {
159- $ this ->uuid = app (UuidFactoryServiceInterface::class)->uuid4 ();
159+ $ this ->uuid ?? = app (UuidFactoryServiceInterface::class)->uuid4 ();
160160 }
161161}
Original file line number Diff line number Diff line change @@ -22,11 +22,14 @@ final class EagerLoadingTest extends TestCase
2222{
2323 public function testUuidDuplicate (): void
2424 {
25+ $ expected = [];
26+
2527 /** @var Buyer[]|Collection $buyerTimes */
2628 $ buyerTimes = BuyerFactory::times (10 )->create ();
2729 foreach ($ buyerTimes as $ buyerTime ) {
2830 self ::assertTrue ($ buyerTime ->wallet ->relationLoaded ('holder ' ));
2931 $ buyerTime ->deposit (100 );
32+ $ expected [] = $ buyerTime ->wallet ->uuid ;
3033 }
3134
3235 /** @var Buyer[] $buyers */
@@ -47,6 +50,7 @@ public function testUuidDuplicate(): void
4750
4851 self ::assertCount (10 , array_unique ($ uuids ));
4952 self ::assertCount (1 , array_unique ($ balances ));
53+ self ::assertEquals ($ expected , $ uuids );
5054 }
5155
5256 public function testTransferTransactions (): void
You can’t perform that action at this time.
0 commit comments