function testRankFor() { $leaderboard = new Leaderboard('leaderboard'); for ($i = 1; $i <= Leaderboard::DEFAULT_PAGE_SIZE + 1; $i++) { $leaderboard->addMember("member_{$i}", $i); } $this->assertEquals(26, $leaderboard->rankFor('member_1')); $this->assertEquals(25, $leaderboard->rankFor('member_1', true)); }