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

testNestedClosureUsedVariableResolution() public method

    public function testNestedClosureUsedVariableResolution()
    {
        $valueSet = [[-500], [-5], [-2], [-1], [1], [2], [5], [500]];
        $factor = 5;
        $this->assertRecompilesCorrectly(function ($i) use($factor) {
            $innerClosure = function ($i) use($factor) {
                return $i * $factor;
            };
            return $innerClosure($i);
        }, $valueSet);
    }