File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ public function testPay(): void
2323            'quantity '  => 1 ,
2424        ]);
2525
26-         $ balance   = (int ) ($ product ->price  + 
27-              $ product ->price  *  $ product -> getFeePercent () /  100 ) ;
26+         $ fee   = (int ) ($ product ->price  *  $ product -> getFeePercent () /  100 ); 
27+         $ balance  =  $ product ->price  +  $ fee  ;
2828
2929        $ this  ->assertEquals ($ buyer ->balance , 0 );
3030        $ buyer ->deposit ($ balance );
@@ -43,6 +43,7 @@ public function testPay(): void
4343        $ this  ->assertEquals ($ withdraw ->amount , -$ balance );
4444        $ this  ->assertEquals ($ deposit ->amount , $ product ->getAmountProduct ());
4545        $ this  ->assertNotEquals ($ deposit ->amount , $ withdraw ->amount );
46+         $ this  ->assertEquals ($ transfer ->fee , $ fee );
4647
4748        $ buyer ->refund ($ product );
4849        $ this  ->assertEquals ($ buyer ->balance , $ deposit ->amount );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments