public function testSetTeamTwo() { $player1 = new Player(); $player2 = new Player(); $this->match->setTeamTwo($player1, $player2); $team = $this->match->getTeamTwo(); $this->assertSame($player1, $team->getAttackingPlayer()); $this->assertSame($player2, $team->getDefendingPlayer()); }
/** * @return int */ protected function getPointsParticipant2() { if ($this->match instanceof SingleMatch) { return $this->match->getPlayer2()->getPoints(); } else { if ($this->match instanceof DoubleMatch) { return $this->getPointsForTeam($this->match->getTeamTwo()); } } }