@@ 622-631 (lines=10) @@ | ||
619 | ->shouldReturn([0, 1, 2, 3]); |
|
620 | } |
|
621 | ||
622 | function it_can_interpose() |
|
623 | { |
|
624 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
625 | ||
626 | $this |
|
627 | ->interpose('a') |
|
628 | ->values() |
|
629 | ->toArray() |
|
630 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
631 | } |
|
632 | ||
633 | function it_can_drop_elements_from_end_of_the_collection() |
|
634 | { |
|
@@ 659-669 (lines=11) @@ | ||
656 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
657 | } |
|
658 | ||
659 | function it_can_repeat_items_of_collection_infinitely() |
|
660 | { |
|
661 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
662 | ||
663 | $this |
|
664 | ->cycle() |
|
665 | ->take(8) |
|
666 | ->values() |
|
667 | ->toArray() |
|
668 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
669 | } |
|
670 | ||
671 | function it_can_prepend_item() |
|
672 | { |