Hoa central
Infinite.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Iterator\Test\Unit;
38 
39 use Hoa\Iterator as LUT;
40 use Hoa\Test;
41 
51 {
52  public function case_classic()
53  {
54  $this
55  ->given(
56  $iterator = new LUT\Map(['a']),
57  $infinite = new LUT\Infinite($iterator),
58  $limit = new LUT\Limit($infinite, 0, 100)
59  )
60  ->when($result = iterator_to_array($limit, false))
61  ->then
62  ->array($result)
63  ->isEqualTo(array_fill(0, 100, 'a'))
64  ->size
65  ->isEqualTo(100);
66  }
67 }