Skip to content

Commit

Permalink
Improve tests for tuples() (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai authored Jun 15, 2024
1 parent 05a57f5 commit a5fa2a6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/TuplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,23 @@ public function testTuples(iterable $input, array $expected, bool $preserve_keys
{
$pipeline = take($input);

$pipeline->tuples();
$actual = $pipeline->tuples()->toArray($preserve_keys);

$this->assertSame(
$expected,
$pipeline->toArray($preserve_keys)
$actual
);
}

public function testNoop(): void
{
$pipeline = new Standard();

$pipeline->tuples();
$actual = $pipeline->tuples()->toArray();

$this->assertSame([], $pipeline->toArray());
$this->assertSame(
[],
$actual
);
}
}

0 comments on commit a5fa2a6

Please sign in to comment.