public function test_updateAll()
 {
     $instance = $this->object;
     $obj = new XoopsRanks();
     $obj->setDirty();
     $obj->setNew();
     $obj->setVar('rank_title', 'RANKTITLE_DUMMY_FOR_TESTS');
     $value = $instance->insert($obj);
     $this->assertTrue(intval($value) > 0);
     $criteria = new Criteria('rank_title', 'RANKTITLE_DUMMY_FOR_TESTS');
     $value = $instance->updateAll('rank_title', 'RANKTITLE_DUMMY_FOR_TESTS_after_updateAll', $criteria);
     $this->assertTrue($value >= 1);
     $criteria = new Criteria('rank_title', 'RANKTITLE_DUMMY_FOR_TESTS_after_updateAll');
     $value = $instance->deleteAll($criteria);
     $this->assertTrue($value >= 1);
 }
Exemple #2
0
 public function test_getUserRankList()
 {
     $class = $this->myClass;
     $instance = new XoopsRanksHandler($this->conn);
     $obj = new XoopsRanks();
     $obj->setDirty();
     $obj->setNew();
     $obj->setVar('rank_special', 1);
     $value = $instance->insert($obj);
     $this->markTestSkipped('');
     $this->assertTrue(is_string($value));
     $value = $class::getUserRankList();
     $this->assertTrue(is_array($value));
     $this->assertTrue(count($value) > 0);
 }