Пример #1
0
 /**
  * @dataProvider sortProvider
  */
 public function testUserSortAndLimits($query, $sort, $cond = null)
 {
     self::checkPlatal();
     $query = XDB::query($query[0]);
     $count = $query->numRows();
     $ids = $query->fetchColumn();
     $this->assertSame($count, count($ids));
     if ($cond == null) {
         $cond = new PFC_True();
     }
     $uf = new UserFilter($cond, $sort);
     for ($i = 0; $i < $count; $i += 7987) {
         $got = $uf->getUIDs(new PlLimit(100, $i));
         $this->assertSame($count, $uf->getTotalUserCount());
         $part = array_slice($ids, $i, 100);
         $this->assertSame($part, $got);
     }
 }