From 2aabbe1a53e63670a5af5b88b9de1ba483427d34 Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Fri, 5 Jun 2015 22:19:20 +0200 Subject: [PATCH] Missing division by zero test for BigDecimal::divideAndRemainder() --- tests/BigDecimalTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/BigDecimalTest.php b/tests/BigDecimalTest.php index bc1e35c..13b1161 100644 --- a/tests/BigDecimalTest.php +++ b/tests/BigDecimalTest.php @@ -1240,6 +1240,14 @@ class BigDecimalTest extends AbstractTestCase ]; } + /** + * @expectedException \Brick\Math\ArithmeticException + */ + public function testDivideAndRemainderByZeroThrowsException() + { + BigDecimal::of(1.2)->divideAndRemainder(0); + } + /** * @dataProvider providerPower *