Skip to content

Commit e743d55

Browse files
committed
Assert that count is zero for an empty pipeline
1 parent f9c0a01 commit e743d55

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Pipeline/SimpleTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ class SimpleTest extends TestCase
2424
public function testEmpty()
2525
{
2626
$this->assertEquals([], iterator_to_array(new Simple()));
27+
28+
$this->assertSame(0, iterator_count(new Standard()));
29+
}
30+
31+
public function testEmptyPHPUnitWise()
32+
{
33+
try {
34+
$this->assertCount(0, new Standard());
35+
} catch (\BadMethodCallException $e) {
36+
$this->markTestIncomplete($e->getMessage());
37+
}
2738
}
2839

2940
public function testSingle()

0 commit comments

Comments
 (0)