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 * @return array */ public static function extractHowAreYouFeeling(Feeling $feeling) { return array_merge($feeling->getNormalisedValues(), array('feelingSectionCompleted' => true === $feeling->isCompleted() ? "true" : "false")); }