diff options
-rw-r--r-- | tests/MathTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index 1b96ee2..f8a271e 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -27,6 +27,12 @@ class MathTest extends \PHPUnit_Framework_TestCase $this->assertEquals($calculator->execute($expression), $phpResult); } + public function testZeroDevision() + { + $calculator = new MathExecutor(); + $this->assertEquals($calculator->execute('1 / 0'), 0); + } + /** * Expressions data provider */ @@ -62,4 +68,4 @@ class MathTest extends \PHPUnit_Framework_TestCase array('100500 * 3.5E-5') ); } -}
\ No newline at end of file +} |