| @@ 531-538 (lines=8) @@ | ||
| 528 | ->shouldReturn([0, 1, 2, 3]); |
|
| 529 | } |
|
| 530 | ||
| 531 | function it_can_interpose() |
|
| 532 | { |
|
| 533 | $this |
|
| 534 | ->interpose('a') |
|
| 535 | ->values() |
|
| 536 | ->toArray() |
|
| 537 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 538 | } |
|
| 539 | ||
| 540 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 541 | { |
|
| @@ 562-570 (lines=9) @@ | ||
| 559 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 560 | } |
|
| 561 | ||
| 562 | function it_can_repeat_items_of_collection_infinitely() |
|
| 563 | { |
|
| 564 | $this |
|
| 565 | ->cycle() |
|
| 566 | ->take(8) |
|
| 567 | ->values() |
|
| 568 | ->toArray() |
|
| 569 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 570 | } |
|
| 571 | ||
| 572 | function it_can_prepend_item() |
|
| 573 | { |
|