/**
  * @param Questionnaire $questionnaire
  */
 protected function buildAmberMovingNarrative(Questionnaire $questionnaire)
 {
     $prefix = 'moving_amber';
     switch (true) {
         case AmberMovingGreenAerobicRedStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_green_strength_red';
             break;
         case AmberMovingAmberAerobicLowDaysGreenStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_days_strength_green';
             break;
         case AmberMovingAmberAerobicLowDurationGreenStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_duration_strength_green';
             break;
         case AmberMovingAmberAerobicLowDaysRedStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_days_strength_red';
             break;
         default:
             $suffix = '_aerobic_amber_duration_strength_red';
             break;
     }
     $this->narrative->addMessages(self::SECTION_NAME, array($prefix . $suffix));
     $symptom = SymptomGenerator::generateRelatedSymptom($questionnaire->getAboutYou()->getFeelings()->getNormalisedValues());
     $value = $questionnaire->getAboutYou()->getFeelings()->getNormalisedValues()[$symptom];
     $this->generateSymptomMessages($value, self::SECTION_NAME, 'amber', $symptom);
 }
 public function testSpecificationIsTrue()
 {
     $days = array('mon' => 80, 'tues' => 100, 'wed' => 37);
     $questionnaire = new Questionnaire(new Person());
     $questionnaire->getMoving()->setAerobicActivityDays($days);
     $this->assertTrue(AmberMovingGreenAerobicRedStrengthSpecification::isSatisfiedBy($questionnaire));
 }
 /**
  * @param Questionnaire $questionnaire
  */
 protected function buildAmberMovingBehaviours(Questionnaire $questionnaire)
 {
     switch (true) {
         case AmberMovingGreenAerobicRedStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_green_strength_red';
             break;
         case AmberMovingAmberAerobicLowDaysGreenStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_days_strength_green';
             break;
         case AmberMovingAmberAerobicLowDurationGreenStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_duration_strength_green';
             break;
         case AmberMovingAmberAerobicLowDaysRedStrengthSpecification::isSatisfiedBy($questionnaire):
             $suffix = '_aerobic_amber_days_strength_red';
             break;
         default:
             $suffix = '_aerobic_amber_duration_strength_red';
             break;
     }
     $this->narrative->addMessages(self::SECTION_NAME, array(MovingNarrativeBuilder::SECTION_NAME => 'behaviours_moving' . $suffix));
 }