Ejemplo n.º 1
0
 public function testResetPointsAndGoals()
 {
     $this->team->setPoints(1);
     $this->team->setGoalsFor(1);
     $this->team->setGoalsAgainst(1);
     $this->team->resetPointsAndGoals();
     $this->assertEquals(0, $this->team->getPoints());
     $this->assertEquals(0, $this->team->getGoalsFor());
     $this->assertEquals(0, $this->team->getGoalsAgainst());
 }
Ejemplo n.º 2
0
 public function testGetPositionByTeam()
 {
     $league = new League();
     $team1 = new Team();
     $team1->setId(1);
     $team1->setPoints(1);
     $league->addTeam($team1);
     $team2 = new Team();
     $team2->setId(2);
     $team2->setPoints(3);
     $league->addTeam($team2);
     $this->assertEquals(1, $league->getPositionByTeam($team2));
     $this->assertEquals(2, $league->getPositionByTeam($team1));
 }