public static function count($count, $value, $description = NULL)
{
self::$counter++;
if (!$value instanceof \Countable && !is_array($value)) {
self::fail(self::describe('%1 should be array or countable object', $description), $value);
} elseif (count($value) !== $count) {
self::fail(self::describe('Count %1 should be %2', $description), count($value), $count);
}
}
private function assertLimit(IDataSource $source) { $all = $source->fetchAll(); Assert::count(self::LIMIT, $all); Assert::count(self::FULL_USER_COUNT, $source->fetchFullData()); Assert::count(self::FULL_USER_COUNT, $source->fetchAllForExport()); Assert::same(self::FULL_USER_COUNT, $source->getTotalCount()); Assert::same(self::LIMIT, $source->count()); return $all; }