aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/MathTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php
index 3e5a7ff..1ffa5ae 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -304,4 +304,11 @@ class MathTest extends \PHPUnit\Framework\TestCase
$this->assertEquals(-4, $calculator->execute('(-4)'));
$this->assertEquals(1, $calculator->execute('(-4 + 5)'));
}
+
+ public function testMinusZero()
+ {
+ $calculator = new MathExecutor();
+ $this->assertEquals(1, $calculator->execute('1 - 0'));
+ $this->assertEquals(1, $calculator->execute('1-0'));
+ }
}