Improve test coverage

This commit is contained in:
Ben Ramsey
2020-02-26 20:17:49 -06:00
parent ba7c1c17ce
commit 0bd312f944
17 changed files with 540 additions and 5 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ final class BrickMathCalculator implements CalculatorInterface
{
try {
return new IntegerObject((string) BigInteger::fromBase($value, $base));
} catch (MathException $exception) {
} catch (MathException | \InvalidArgumentException $exception) {
throw new InvalidArgumentException(
$exception->getMessage(),
(int) $exception->getCode(),
@@ -115,7 +115,7 @@ final class BrickMathCalculator implements CalculatorInterface
{
try {
return BigInteger::of($value->toString())->toBase($base);
} catch (MathException $exception) {
} catch (MathException | \InvalidArgumentException $exception) {
throw new InvalidArgumentException(
$exception->getMessage(),
(int) $exception->getCode(),