public function testPlayer() { $player = new Player(); $ranking = new PlayerRanking($player); $this->assertSame($player, $ranking->getPlayer()); }
/** * @param \Application\Model\PlayerRanking $player * @param int $teamIndex * @param int $opponentIndex * @param \Application\Model\Entity\Game $game */ protected function setRankingForPlayer($player, $teamIndex, $opponentIndex, $game) { $player->addGoals($game->getGoalsForTeam($teamIndex)); $player->addGoalsAgainst($game->getGoalsForTeam($opponentIndex)); $player->addPoints($this->getPointsForPlayer($game, $teamIndex)); }