/**
  * @param int $teamIndex
  *
  * @return Trainer
  */
 protected function createEntity($teamIndex)
 {
     $trainer = new Trainer();
     $trainer->setPreferredTraining(rand(1, 3));
     $trainer->setSkill(max(1, min(100, round(rand(1, 100) / $teamIndex * 5))));
     return $trainer;
 }
 public function testTrainByNeutralTrainerWithSkill50()
 {
     $this->setUpPlayer(0, 0);
     $this->trainer->setSkill(50);
     $this->trainer->train($this->player);
     $this->assertEquals(25, $this->player->getTrainingValueDefense());
     $this->assertEquals(25, $this->player->getTrainingValueOffense());
 }