| @@ 569-578 (lines=10) @@ | ||
| 566 | ->shouldReturn([0, 1, 2, 3]); |
|
| 567 | } |
|
| 568 | ||
| 569 | function it_can_interpose() |
|
| 570 | { |
|
| 571 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 572 | ||
| 573 | $this |
|
| 574 | ->interpose('a') |
|
| 575 | ->values() |
|
| 576 | ->toArray() |
|
| 577 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 578 | } |
|
| 579 | ||
| 580 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 581 | { |
|
| @@ 606-616 (lines=11) @@ | ||
| 603 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 604 | } |
|
| 605 | ||
| 606 | function it_can_repeat_items_of_collection_infinitely() |
|
| 607 | { |
|
| 608 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 609 | ||
| 610 | $this |
|
| 611 | ->cycle() |
|
| 612 | ->take(8) |
|
| 613 | ->values() |
|
| 614 | ->toArray() |
|
| 615 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 616 | } |
|
| 617 | ||
| 618 | function it_can_prepend_item() |
|
| 619 | { |
|