fromArray() public static method

Returns a fluent iterator for $array
public static fromArray ( array $array ) : FluentIterator
$array array
return FluentIterator
Beispiel #1
0
 /**
  * @test
  */
 public function shouldReturnFirstElementInIterator()
 {
     //given
     $iterator = FluentIterator::fromArray(array('a', 'b'));
     // when
     $first = $iterator->first();
     // then
     $this->assertEquals('a', $first);
 }