Ouzo\Utilities\Iterator\FluentIteratorTest::shouldGenerateValues PHP 메소드

shouldGenerateValues() 공개 메소드

    public function shouldGenerateValues()
    {
        //when
        $generator = function () {
            return 1;
        };
        $result = FluentIterator::fromFunction($generator)->limit(3);
        //then
        $this->assertEquals(array(1, 1, 1), $result->toArray());
    }