@@ 504-511 (lines=8) @@ | ||
501 | ->shouldReturn([0, 1, 2, 3]); |
|
502 | } |
|
503 | ||
504 | function it_can_interpose() |
|
505 | { |
|
506 | $this |
|
507 | ->interpose('a') |
|
508 | ->values() |
|
509 | ->toArray() |
|
510 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
511 | } |
|
512 | ||
513 | function it_can_drop_elements_from_end_of_the_collection() |
|
514 | { |
|
@@ 535-543 (lines=9) @@ | ||
532 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
533 | } |
|
534 | ||
535 | function it_can_repeat_items_of_collection_infinitely() |
|
536 | { |
|
537 | $this |
|
538 | ->cycle() |
|
539 | ->take(8) |
|
540 | ->values() |
|
541 | ->toArray() |
|
542 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
543 | } |
|
544 | ||
545 | function it_can_prepend_item() |
|
546 | { |