/** * @covers PHPUnit_Framework_Constraint_Count */ public function testConstraintCountFailing() { $constraint = new PHPUnit_Framework_Constraint_Count(5); try { $constraint->fail(array(1, 2), ''); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals('Count of 2 does not match expected count of 5.', $e->getDescription()); return; } $this->fail(); }