| @@ 577-586 (lines=10) @@ | ||
| 574 | ->shouldReturn([0, 1, 2, 3]); |
|
| 575 | } |
|
| 576 | ||
| 577 | function it_can_interpose() |
|
| 578 | { |
|
| 579 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 580 | ||
| 581 | $this |
|
| 582 | ->interpose('a') |
|
| 583 | ->values() |
|
| 584 | ->toArray() |
|
| 585 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 586 | } |
|
| 587 | ||
| 588 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 589 | { |
|
| @@ 614-624 (lines=11) @@ | ||
| 611 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 612 | } |
|
| 613 | ||
| 614 | function it_can_repeat_items_of_collection_infinitely() |
|
| 615 | { |
|
| 616 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
| 617 | ||
| 618 | $this |
|
| 619 | ->cycle() |
|
| 620 | ->take(8) |
|
| 621 | ->values() |
|
| 622 | ->toArray() |
|
| 623 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 624 | } |
|
| 625 | ||
| 626 | function it_can_prepend_item() |
|
| 627 | { |
|