Skip to content

Commit

Permalink
Assert that count is zero for an empty pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Jul 1, 2019
1 parent f9c0a01 commit e743d55
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Pipeline/SimpleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ class SimpleTest extends TestCase
public function testEmpty()
{
$this->assertEquals([], iterator_to_array(new Simple()));

$this->assertSame(0, iterator_count(new Standard()));
}

public function testEmptyPHPUnitWise()
{
try {
$this->assertCount(0, new Standard());
} catch (\BadMethodCallException $e) {
$this->markTestIncomplete($e->getMessage());
}
}

public function testSingle()
Expand Down

0 comments on commit e743d55

Please sign in to comment.