File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ public function forceTransferFloat(
148148    public  function  getBalanceFloatAttribute (): string 
149149    {
150150        $ mathapp (MathServiceInterface::class);
151-         $ walletapp (CastServiceInterface::class)->getWallet ($ this 
151+         $ walletapp (CastServiceInterface::class)->getWallet ($ this ,  false );
152152        $ decimalPlacesValue$ walletdecimal_places ;
153153        $ decimalPlaces$ mathpowTen ($ decimalPlacesValue
154154
Original file line number Diff line number Diff line change 1919 */ 
2020final  class  BalanceTest extends  TestCase
2121{
22+     public  function  testBalanceWalletNotExists ()
23+     {
24+         /** @var Buyer $buyer */ 
25+         $ buyernew ()->create ();
26+         self ::assertFalse ($ buyerrelationLoaded ('wallet ' ));
27+ 
28+         self ::assertSame (0 , (int ) $ buyerwallet ->balance );
29+         self ::assertFalse ($ buyerwallet ->exists );
30+ 
31+         self ::assertSame (0 , $ buyerwallet ->balanceInt );
32+         self ::assertFalse ($ buyerwallet ->exists );
33+ 
34+         self ::assertSame (0. , (float )$ buyerwallet ->balanceFloat );
35+         self ::assertFalse ($ buyerwallet ->exists );
36+ 
37+         self ::assertSame (0. , $ buyerwallet ->balanceFloatNum );
38+         self ::assertFalse ($ buyerwallet ->exists );
39+     }
40+ 
2241    public  function  testDepositWalletExists (): void 
2342    {
2443        /** @var Buyer $buyer */ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments