public function testGoalsAgainst() { $this->ranking->addGoalsAgainst(3); $this->ranking->addGoalsAgainst(2); $this->assertEquals(5, $this->ranking->getGoalsAgainst()); }
/** * @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)); }