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