From ec7e58ca053383ac56bc83d236ce7f09f72c1053 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 29 Aug 2014 12:02:45 +0200 Subject: [PATCH] AssertCount on HHVM freezes --- tests/Framework/AssertTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 */