diff --git a/tests/Framework/AssertTest.php b/tests/Framework/AssertTest.php index 2f157c229b2..dde215adcfd 100644 --- a/tests/Framework/AssertTest.php +++ b/tests/Framework/AssertTest.php @@ -3525,6 +3525,22 @@ public function testAssertCount() $this->fail(); } + /** + * @covers PHPUnit_Framework_Assert::assertCount + */ + public function testAssertCountTraversable() + { + $this->assertCount(2, new ArrayIterator(array(1,2))); + + try { + $this->assertCount(2, new ArrayIterator(array(1,2,3))); + } catch (PHPUnit_Framework_AssertionFailedError $e) { + return; + } + + $this->fail(); + } + /** * @covers PHPUnit_Framework_Assert::assertCount */