aboutsummaryrefslogtreecommitdiff
path: root/tests/MathTest.php
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2017-09-12 15:32:08 +0300
committerGitHub <noreply@github.com>2017-09-12 15:32:08 +0300
commit3cd949c04fe0aa3820694b47e951bb6f1528ac72 (patch)
tree8c2a14bcf09439e0544f6af3300d2229d0f39e44 /tests/MathTest.php
parent3436e0a51ff4c709226178f897e053c0fae8da4c (diff)
parent8d602b30dd9bf9e1b926c0d732c2ff3fe7b6644a (diff)
Merge pull request #20 from ochi51/master
Fixes exponentiation operator
Diffstat (limited to 'tests/MathTest.php')
-rw-r--r--tests/MathTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php
index f8a271e..a83a0d4 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -33,6 +33,12 @@ class MathTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($calculator->execute('1 / 0'), 0);
}
+ public function testExponentiation()
+ {
+ $calculator = new MathExecutor();
+ $this->assertEquals($calculator->execute('10 ^ 2'), 100);
+ }
+
/**
* Expressions data provider
*/