function testScoreAndRankFor() { $leaderboard = new Leaderboard('leaderboard'); for ($i = 1; $i <= 5; $i++) { $leaderboard->addMember("member_{$i}", $i); } $memberData = $leaderboard->scoreAndRankFor('member_1'); $this->assertEquals('member_1', $memberData['member']); $this->assertEquals(1, $memberData['score']); $this->assertEquals(5, $memberData['rank']); }