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 @@ -168,6 +168,6 @@ public function getCurrencyAttribute(): string
168168
169169 protected function initializeMorphOneWallet (): void
170170 {
171- $ this ->uuid = app (UuidFactoryServiceInterface::class)->uuid4 ();
171+ $ this ->uuid ?? = app (UuidFactoryServiceInterface::class)->uuid4 ();
172172 }
173173}
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 Collection<int, Buyer> $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 Collection<int, Buyer> $buyers */
@@ -46,6 +49,7 @@ public function testUuidDuplicate(): void
4649
4750 self ::assertCount (10 , array_unique ($ uuids ));
4851 self ::assertCount (1 , array_unique ($ balances ));
52+ self ::assertEquals ($ expected , $ uuids );
4953 }
5054
5155 public function testTransferTransactions (): void
You can’t perform that action at this time.
0 commit comments