diff options
author | Bruce Wells <brucekwells@gmail.com> | 2019-01-12 08:05:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-12 08:05:03 +0300 |
commit | c7f937c002adead83dd13c78e476408abbdfc671 (patch) | |
tree | 190b74be3dbbf1e8fba00ac4885c08555b0d5dce | |
parent | 44e2bb192eb1c847741894ef24c8fbe24fe2f15a (diff) | |
parent | 92445b50835cb68aa98cb92f1422695cae8c7343 (diff) |
Merge branch 'master' into master
-rw-r--r-- | tests/MathTest.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index 20f4d23..8eb7827 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -146,7 +146,6 @@ class MathTest extends \PHPUnit_Framework_TestCase public function testFunction() { $calculator = new MathExecutor(); - $calculator->addFunction('round', function ($arg) {return round($arg);}); /** @var float $phpResult */ eval('$phpResult = round(100/30);'); @@ -159,8 +158,8 @@ class MathTest extends \PHPUnit_Framework_TestCase $testString = "some, long. arg; with: different-separators!"; $calculator->addFunction('test', function ($arg) use ($testString) { $this->assertEquals($testString, $arg); - return 0; - }, 1); + return 0;} + ); $calculator->execute('test("' . $testString . '")'); // single quotes $calculator->execute("test('" . $testString . "')"); // double quotes } |