assertAttributeCount() public static method

Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
public static assertAttributeCount ( integer $expectedCount, string $haystackAttributeName, string | object $haystackClassOrObject, string $message = '' )
$expectedCount integer
$haystackAttributeName string
$haystackClassOrObject string | object
$message string
Esempio n. 1
0
 public function canBeInstantiated()
 {
     $file = new \Oblogic7\Tlog\File('tests/_data/2013-10-13 16-58-51.tlog');
     PHPUnit_Framework_Assert::assertAttributeCount(16187, 'messages', $file);
     PHPUnit_Framework_Assert::assertAttributeCount(16187, 'entries', $file);
 }
Esempio n. 2
0
/**
 * Asserts the number of elements of an array, Countable or Iterator
 * that is stored in an attribute.
 *
 * @param integer $expectedCount
 * @param string  $haystackAttributeName
 * @param mixed   $haystackClassOrObject
 * @param string  $message
 * @since Method available since Release 3.6.0
 */
function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
{
    return PHPUnit_Framework_Assert::assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message);
}