given( $counter1 = new LUT\Counter(0, 12, 3), $counter2 = new LUT\Counter(13, 23, 2), $append = new LUT\Append(), $append->append($counter1), $append->append($counter2) ) ->when($result = iterator_to_array($append, false)) ->then ->array($result) ->isEqualTo([ 0, 3, 6, 9, 13, 15, 17, 19, 21 ]); } public function case_singleton() { $this ->given( $counter1 = new LUT\Counter(0, 12, 3), $append = new LUT\Append(), $append->append($counter1) ) ->when($result = iterator_to_array($append)) ->then ->array($result) ->isEqualTo([ 0, 3, 6, 9 ]); } public function case_empty() { $this ->given($append = new LUT\Append()) ->when($result = iterator_to_array($append)) ->then ->array($result) ->isEmpty(); } }