/** * @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()); } } }
public function testPlayer2Property() { $player = new Player(); $this->match->setPlayer2($player); $this->assertSame($player, $this->match->getPlayer2()); }