Pinq\Tests\Integration\Collection\ApplyTest::testThatCollectionApplyWorksOnScopedValues PHP Метод

testThatCollectionApplyWorksOnScopedValues() публичный Метод

public testThatCollectionApplyWorksOnScopedValues ( Pinq\ICollection $collection, array $data )
$collection Pinq\ICollection
$data array
    public function testThatCollectionApplyWorksOnScopedValues(\Pinq\ICollection $collection, array $data)
    {
        $collection->where(function ($i) {
            return $i % 2 === 0;
        })->apply(function (&$i) {
            $i *= 10;
        });
        $this->assertMatches($collection, [1, 20, 3, 40, 5, 60, 7, 80, 9, 100]);
    }