Skip to content

Commit

Permalink
Merge pull request #77 from sanmai/pr/v3.x/countZero
Browse files Browse the repository at this point in the history
Assert that count is zero for an empty pipeline
  • Loading branch information
sanmai committed Aug 15, 2019
2 parents d2b868d + e09e079 commit 7ecc1b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/StandardTest.php
Expand Up @@ -34,6 +34,17 @@ public function testEmpty()

$pipeline = new Standard();
$this->assertSame([], $pipeline->toArray());

$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 7ecc1b0

Please sign in to comment.