public static function PHPUnit_Framework_Assert::assertNotCount

Asserts the number of elements of an array, Countable or Iterator.

Parameters

integer $expectedCount:

mixed $haystack:

string $message:

1 call to PHPUnit_Framework_Assert::assertNotCount()
PHPUnit_Framework_Assert::assertAttributeNotCount in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts the number of elements of an array, Countable or Iterator that is stored in an attribute.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php, line 420

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertNotCount($expectedCount, $haystack, $message = '') {
  if (!is_int($expectedCount)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
  }
  if (!$haystack instanceof Countable && !$haystack instanceof Iterator && !is_array($haystack)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable');
  }
  $constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_Count($expectedCount));
  self::assertThat($haystack, $constraint, $message);
}