| @@ 630-639 (lines=10) @@ | ||
| 627 | ->shouldReturn([0, 1, 2, 3]); |
|
| 628 | } |
|
| 629 | ||
| 630 | function it_can_interpose() |
|
| 631 | { |
|
| 632 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 633 | ||
| 634 | $this |
|
| 635 | ->interpose('a') |
|
| 636 | ->values() |
|
| 637 | ->toArray() |
|
| 638 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 639 | } |
|
| 640 | ||
| 641 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 642 | { |
|
| @@ 667-677 (lines=11) @@ | ||
| 664 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 665 | } |
|
| 666 | ||
| 667 | function it_can_repeat_items_of_collection_infinitely() |
|
| 668 | { |
|
| 669 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 670 | ||
| 671 | $this |
|
| 672 | ->cycle() |
|
| 673 | ->take(8) |
|
| 674 | ->values() |
|
| 675 | ->toArray() |
|
| 676 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 677 | } |
|
| 678 | ||
| 679 | function it_can_prepend_item() |
|
| 680 | { |
|