/**
  * Get the top performers for this iteration.
  * If you dont specify how many you want, it will return the same number
  * as defined in the citizensCountToReplacePerGeneration.
  *
  * @param int|null $howMany
  *
  * @return Citizen[]|array
  */
 protected function getTopPerformers($howMany = null)
 {
     $topPerformers = [];
     if ($howMany === null) {
         $howMany = $this->citizensCountToReplacePerGeneration;
     }
     $topPerformerIdentifiers = $this->scoreManager->getTopPerformersUniqueIdentifiers($howMany);
     foreach ($topPerformerIdentifiers as $identifier) {
         $topPerformers[] = $this->population->getCitizenByUniqueIdentifier($identifier);
     }
     return $topPerformers;
 }
 public function testGetTopPerformerUniqueIdentifier()
 {
     $topPerformersIdentifiers = $this->scoreManager->getTopPerformersUniqueIdentifiers(1);
     $this->assertEquals($this->highestScoreCitizen->getUniqueIdentifier(), $topPerformersIdentifiers[0]);
 }