Skip to content

Commit

Permalink
Fix tests for brick/math v0.9
Browse files Browse the repository at this point in the history
The BigNumber::of() factory method now accepts decimal numbers with an integral part and no fractional part, and vice versa.
  • Loading branch information
BenMorel committed Aug 19, 2020
1 parent 7fb96c8 commit f922b35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/MoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function providerOf() : array
['CUSTOM 0.428', BigRational::of('3/7'), new Currency('CUSTOM', 0, '', 3), null, RoundingMode::DOWN],
['CUSTOM 0.4286', BigRational::of('3/7'), new Currency('CUSTOM', 0, '', 3), new CustomContext(4, 1), RoundingMode::UP],
[RoundingNecessaryException::class, '1.2', 'JPY'],
[NumberFormatException::class, '1.', 'JPY'],
[NumberFormatException::class, '1..', 'JPY'],
];
}

Expand Down Expand Up @@ -95,7 +95,7 @@ public function providerOfMinor() : array
['JPY 600', 600, 'JPY'],
['USD 1.2350', '123.5', 'USD', new CustomContext(4)],
[RoundingNecessaryException::class, '123.5', 'USD'],
[NumberFormatException::class, '123.', 'USD'],
[NumberFormatException::class, '123..', 'USD'],
];
}

Expand Down

0 comments on commit f922b35

Please sign in to comment.