public function testStandingsWithGoalsFor() { $league = new League(); $team1 = new Team(); $team1->setId(1); $team1->setPoints(1); $team1->setGoalsFor(5); $team1->setGoalsAgainst(3); $league->addTeam($team1); $team2 = new Team(); $team2->setId(2); $team2->setPoints(1); $team2->setGoalsFor(6); $team2->setGoalsAgainst(4); $league->addTeam($team2); $this->assertTrue($league->getTeamByPosition(1)->equals($team2)); $this->assertTrue($league->getTeamByPosition(2)->equals($team1)); }