File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public function testSimple(): void
28
28
self ::assertSame (0 , $ wallet ->balanceInt );
29
29
30
30
$ transaction = $ wallet ->deposit (1000 , ['desc ' => 'unconfirmed ' ], false );
31
+ self ::assertTrue ($ transaction ->getKey () > 0 );
31
32
self ::assertSame (0 , $ wallet ->balanceInt );
32
33
self ::assertFalse ($ transaction ->confirmed );
33
34
@@ -47,6 +48,7 @@ public function testSafe(): void
47
48
$ transaction = $ wallet ->forceWithdraw (1000 , ['desc ' => 'unconfirmed ' ], false );
48
49
self ::assertSame (0 , $ wallet ->balanceInt );
49
50
self ::assertFalse ($ transaction ->confirmed );
51
+ self ::assertTrue ($ transaction ->getKey () > 0 );
50
52
51
53
$ wallet ->safeConfirm ($ transaction );
52
54
self ::assertSame (0 , $ wallet ->balanceInt );
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public function testCustomAttribute(): void
30
30
self ::assertFalse ($ buyer ->relationLoaded ('wallet ' ));
31
31
$ transaction = $ buyer ->deposit (1000 , ['bank_method ' => 'VietComBank ' ]);
32
32
33
+ self ::assertTrue ($ transaction ->getKey () > 0 );
33
34
self ::assertSame ($ transaction ->amountInt , $ buyer ->balanceInt );
34
35
self ::assertInstanceOf (Transaction::class, $ transaction );
35
36
self ::assertSame ('VietComBank ' , $ transaction ->bank_method );
@@ -47,6 +48,7 @@ public function testTransactionMoneyAttribute(): void
47
48
self ::assertFalse ($ buyer ->relationLoaded ('wallet ' ));
48
49
$ transaction = $ buyer ->deposit (1000 , ['currency ' => 'EUR ' ]);
49
50
51
+ self ::assertTrue ($ transaction ->getKey () > 0 );
50
52
self ::assertSame ($ transaction ->amountInt , $ buyer ->balanceInt );
51
53
self ::assertInstanceOf (TransactionMoney::class, $ transaction );
52
54
self ::assertSame ('1000 ' , $ transaction ->currency ->getAmount ());
You can’t perform that action at this time.
0 commit comments