Skip to content

Commit

Permalink
UtilsTests::testCreateLambda_lambdaString - added missing test for la…
Browse files Browse the repository at this point in the history
…mbda cache
  • Loading branch information
sanmai committed Mar 17, 2018
1 parent da96252 commit 69e73cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/Unit/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ function testCreateLambda_lambdaString ()
$f = U::createLambda('($q, $w, $e, $r) ==> { return $w+$e; }', 'a,b,c,d');
$this->assertSame(5, $f(1, 2, 3, 4));
$this->assertSame(5, $f(1, 2, 3, 4, 5));

$f2 = U::createLambda('($q, $w, $e, $r) ==> { return $w+$e; }', 'a,b,c,d');
$this->assertSame($f, $f2);
$this->assertSame(5, $f2(1, 2, 3, 4));
$this->assertSame(5, $f2(1, 2, 3, 4, 5));
}

/** @covers YaLinqo\Utils::createComparer
Expand Down

0 comments on commit 69e73cd

Please sign in to comment.