PHPUnit_Framework_Assert::assertAttributeCount PHP Method

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
    public static function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
    {
        static::assertCount($expectedCount, static::readAttribute($haystackClassOrObject, $haystackAttributeName), $message);
    }

Usage Example

Example #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);
 }
All Usage Examples Of PHPUnit_Framework_Assert::assertAttributeCount
PHPUnit_Framework_Assert