Pinq\Tests\Integration\ExpressionTrees\ComplexConverterTest::testNestedClosure PHP Method

testNestedClosure() public method

public testNestedClosure ( )
    public function testNestedClosure()
    {
        $valueSet = [[-500], [-5], [-2], [-1], [1], [2], [5], [500]];
        $this->assertRecompilesCorrectly(function ($i) {
            $divider = function () use($i) {
                return $i / 5;
            };
            return $divider();
        }, $valueSet);
    }