public function testGetNormalisedArbitaryValues()
 {
     $expected = array('energy' => -1, 'fatigue' => -2, 'fitness' => 0, 'mood' => 1, 'stress' => 2, 'weight' => 0);
     $this->instance->setEnergy(21)->setFatigue(1)->setMood(61)->setStress(100);
     $this->assertEquals($expected, $this->instance->getNormalisedValues());
     $this->assertEquals(0, $this->instance->getNormalisedScore());
 }
 /**
  * @param Feeling      $feeling
  * @param ParamFetcher $paramFetcher
  * @return Questionnaire
  * @throws \Exception
  */
 public function updateFeeling(Feeling $feeling, ParamFetcher $paramFetcher)
 {
     $entityManager = $this->getEntityManager();
     $feeling->setEnergy($paramFetcher->get('energy'))->setFitness($paramFetcher->get('fitness'))->setStress($paramFetcher->get('stress'))->setFatigue($paramFetcher->get('fatigue'))->setMood($paramFetcher->get('mood'))->setWeight($paramFetcher->get('weight'))->setCompletedDate(new \DateTime());
     $entityManager->persist($feeling);
     $entityManager->flush();
     return $this->getParentQuestionnaireForSection($feeling);
 }