Example #1
0
 /**
  * @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));
 }
Example #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testGoalsForTeamWithInvalidIndex()
 {
     $this->game->setGoalsTeamTwo(3);
     $this->game->getGoalsForTeam(3);
 }