Pinq\Tests\Integration\Collection\ApplyTest::testApplyDoesNotWorkAfterProjection PHP Method

testApplyDoesNotWorkAfterProjection() public method

public testApplyDoesNotWorkAfterProjection ( Pinq\ICollection $collection, array $data )
$collection Pinq\ICollection
$data array
    public function testApplyDoesNotWorkAfterProjection(\Pinq\ICollection $collection, array $data)
    {
        $projectedCollection = $collection->select(function ($i) {
            return $i;
        });
        $projectedCollection->apply(function (&$i) {
            $i *= 10;
        });
        $this->assertMatches($collection, range(1, 10));
        $this->assertMatches($projectedCollection, range(1, 10));
    }