@@ 555-564 (lines=10) @@ | ||
552 | ->shouldReturn([0, 1, 2, 3]); |
|
553 | } |
|
554 | ||
555 | function it_can_interpose() |
|
556 | { |
|
557 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
558 | ||
559 | $this |
|
560 | ->interpose('a') |
|
561 | ->values() |
|
562 | ->toArray() |
|
563 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
564 | } |
|
565 | ||
566 | function it_can_drop_elements_from_end_of_the_collection() |
|
567 | { |
|
@@ 592-602 (lines=11) @@ | ||
589 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
590 | } |
|
591 | ||
592 | function it_can_repeat_items_of_collection_infinitely() |
|
593 | { |
|
594 | $this->beConstructedWith([1, 3, 3, 2,]); |
|
595 | ||
596 | $this |
|
597 | ->cycle() |
|
598 | ->take(8) |
|
599 | ->values() |
|
600 | ->toArray() |
|
601 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
602 | } |
|
603 | ||
604 | function it_can_prepend_item() |
|
605 | { |