mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix rounding when checking total mismatch
This commit is contained in:
parent
ff19c78d3a
commit
0e82a5f6c9
2 changed files with 5 additions and 3 deletions
|
@ -443,8 +443,9 @@ class PurchaseUnitTest extends TestCase
|
|||
}
|
||||
}
|
||||
$amount = Mockery::mock(Amount::class);
|
||||
$amount->shouldReceive('to_array')->andReturn(['value' => [], 'breakdown' => []]);
|
||||
$amount->shouldReceive('to_array')->andReturn(['value' => number_format( $test['amount'], 2, '.', '' ), 'breakdown' => []]);
|
||||
$amount->shouldReceive('value')->andReturn($test['amount']);
|
||||
$amount->shouldReceive('currency_code')->andReturn('EUR');
|
||||
$amount->shouldReceive('breakdown')->andReturn($breakdown);
|
||||
|
||||
$values[$testKey] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue