Ouzo\Utilities\Iterator\FluentIteratorTest::shouldCycleIndefinitely PHP Метод

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

    public function shouldCycleIndefinitely()
    {
        //given
        $iterator = new \ArrayIterator(array(1, 2, 3, 4));
        //when
        $result = FluentIterator::from($iterator)->cycle()->limit(10)->reindex();
        //then
        $this->assertEquals(array(1, 2, 3, 4, 1, 2, 3, 4, 1, 2), $result->toArray());
    }