| @@ 640-649 (lines=10) @@ | ||
| 637 | ->shouldReturn([0, 1, 2, 3]); |
|
| 638 | } |
|
| 639 | ||
| 640 | function it_can_interpose() |
|
| 641 | { |
|
| 642 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 643 | ||
| 644 | $this |
|
| 645 | ->interpose('a') |
|
| 646 | ->values() |
|
| 647 | ->toArray() |
|
| 648 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 649 | } |
|
| 650 | ||
| 651 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 652 | { |
|
| @@ 677-687 (lines=11) @@ | ||
| 674 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 675 | } |
|
| 676 | ||
| 677 | function it_can_repeat_items_of_collection_infinitely() |
|
| 678 | { |
|
| 679 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 680 | ||
| 681 | $this |
|
| 682 | ->cycle() |
|
| 683 | ->take(8) |
|
| 684 | ->values() |
|
| 685 | ->toArray() |
|
| 686 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 687 | } |
|
| 688 | ||
| 689 | function it_can_prepend_item() |
|
| 690 | { |
|