Example #1
0
 public function testGetUserLeaderboardCount()
 {
     $count = GamePointUtil::getUserLeaderboardCount(GamePointUtil::LEADERBOARD_TYPE_WEEKLY);
     $this->assertTrue(Yii::app()->gameHelper->enabled);
     //test to see if enabled when running all tests
     $this->assertEquals(1, $count);
     $count = GamePointUtil::getUserLeaderboardCount(GamePointUtil::LEADERBOARD_TYPE_MONTHLY);
     $this->assertEquals(1, $count);
     $count = GamePointUtil::getUserLeaderboardCount(GamePointUtil::LEADERBOARD_TYPE_OVERALL);
     $this->assertEquals(1, $count);
 }
 /**
  * See the yii documentation. This function is made public for unit testing.
  */
 public function calculateTotalItemCount()
 {
     return GamePointUtil::getUserLeaderboardCount($this->type);
 }