Skip to content

Commit a5fa2a6

Browse files
authored
Improve tests for tuples() (#148)
1 parent 05a57f5 commit a5fa2a6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/TuplesTest.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,23 @@ public function testTuples(iterable $input, array $expected, bool $preserve_keys
9090
{
9191
$pipeline = take($input);
9292

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

9595
$this->assertSame(
9696
$expected,
97-
$pipeline->toArray($preserve_keys)
97+
$actual
9898
);
9999
}
100100

101101
public function testNoop(): void
102102
{
103103
$pipeline = new Standard();
104104

105-
$pipeline->tuples();
105+
$actual = $pipeline->tuples()->toArray();
106106

107-
$this->assertSame([], $pipeline->toArray());
107+
$this->assertSame(
108+
[],
109+
$actual
110+
);
108111
}
109112
}

0 commit comments

Comments
 (0)