diff options
Diffstat (limited to 'tests')
-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 } |