diff options
Diffstat (limited to 'tests/MathTest.php')
-rw-r--r-- | tests/MathTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index 3cf4dbd..eba32c0 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -166,6 +166,14 @@ class MathTest extends \PHPUnit_Framework_TestCase $this->assertEquals($phpResult, $calculator->execute($expression)); } + public function testFunctionsWithQuotes() + { + $calculator = new MathExecutor(); + $calculator->addFunction('concat', function($first, $second){return $first.$second;}); + $this->assertEquals('testing', $calculator->execute('concat("test", "ing")')); + $this->assertEquals('testing', $calculator->execute("concat('test', 'ing')")); + } + public function testQuotes() { $calculator = new MathExecutor(); |