/** * @return int */ protected function getPointsParticipant1() { if ($this->match instanceof SingleMatch) { return $this->match->getPlayer1()->getPoints(); } else { if ($this->match instanceof DoubleMatch) { return $this->getPointsForTeam($this->match->getTeamOne()); } } }
public function testPlayer1Property() { $player = new Player(); $this->match->setPlayer1($player); $this->assertSame($player, $this->match->getPlayer1()); }