| @@ 508-515 (lines=8) @@ | ||
| 505 | ->shouldReturn([0, 1, 2, 3]); |
|
| 506 | } |
|
| 507 | ||
| 508 | function it_can_interpose() |
|
| 509 | { |
|
| 510 | $this |
|
| 511 | ->interpose('a') |
|
| 512 | ->values() |
|
| 513 | ->toArray() |
|
| 514 | ->shouldReturn([1, 'a', 3, 'a', 3, 'a', 2]); |
|
| 515 | } |
|
| 516 | ||
| 517 | function it_can_drop_elements_from_end_of_the_collection() |
|
| 518 | { |
|
| @@ 539-547 (lines=9) @@ | ||
| 536 | ->shouldReturn([1, 'a', 3, 'b', 3, 'c', 2, 'd', 'e']); |
|
| 537 | } |
|
| 538 | ||
| 539 | function it_can_repeat_items_of_collection_infinitely() |
|
| 540 | { |
|
| 541 | $this |
|
| 542 | ->cycle() |
|
| 543 | ->take(8) |
|
| 544 | ->values() |
|
| 545 | ->toArray() |
|
| 546 | ->shouldReturn([1, 3, 3, 2, 1, 3, 3, 2]); |
|
| 547 | } |
|
| 548 | ||
| 549 | function it_can_prepend_item() |
|
| 550 | { |
|