public function CountTest::testCount in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php \CountTest::testCount()
File
- vendor/
phpunit/ phpunit/ tests/ Framework/ Constraint/ CountTest.php, line 17
Class
- CountTest
- @since Class available since Release 3.7.30 @covers PHPUnit_Framework_Constraint_Count
Code
public function testCount() {
$countConstraint = new PHPUnit_Framework_Constraint_Count(3);
$this
->assertTrue($countConstraint
->evaluate(array(
1,
2,
3,
), '', true));
$countConstraint = new PHPUnit_Framework_Constraint_Count(0);
$this
->assertTrue($countConstraint
->evaluate(array(), '', true));
$countConstraint = new PHPUnit_Framework_Constraint_Count(2);
$it = new TestIterator(array(
1,
2,
));
$this
->assertTrue($countConstraint
->evaluate($it, '', true));
}