Skip to content

Commit d71fe86

Browse files
committed
Test that reduce() returns an int for the default reducer
1 parent e743d55 commit d71fe86

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Pipeline/SimpleTest.php

+7
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ public function testToArray()
176176
$this->assertEquals(range(1, 10), $pipeline->toArray());
177177
}
178178

179+
public function testReduceEmpty()
180+
{
181+
$pipeline = new Standard();
182+
183+
$this->assertSame(0, $pipeline->reduce());
184+
}
185+
179186
public function testMeaningless()
180187
{
181188
$pipeline = new Simple(new \ArrayIterator([]));

0 commit comments

Comments
 (0)