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