Skip to content

Commit

Permalink
tests: Add missing test for the Window operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 22, 2021
1 parent d27116a commit a2ee653
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/loophp/collection/CollectionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4047,6 +4047,12 @@ public function it_can_window(): void
],
]);

$this::fromIterable(range('a', 'e'))
->window(-1)
->shouldIterateAs([
['a'], ['a', 'b'], ['a', 'b', 'c'], ['a', 'b', 'c', 'd'], ['a', 'b', 'c', 'd', 'e'],
]);

// Unsupported - but tested.
$this::fromIterable(range('a', 'e'))
->window(-2)
Expand Down

0 comments on commit a2ee653

Please sign in to comment.