Skip to content

Commit

Permalink
Test that reduce() returns an int for the default reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Jul 2, 2019
1 parent e743d55 commit d71fe86
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Pipeline/SimpleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ public function testToArray()
$this->assertEquals(range(1, 10), $pipeline->toArray());
}

public function testReduceEmpty()
{
$pipeline = new Standard();

$this->assertSame(0, $pipeline->reduce());
}

public function testMeaningless()
{
$pipeline = new Simple(new \ArrayIterator([]));
Expand Down

0 comments on commit d71fe86

Please sign in to comment.