/**
  * @param Questionnaire $questionnaire
  * @param string        $rag
  * @param string        $suffix
  */
 protected function buildDrinkingBehaviours(Questionnaire $questionnaire, $rag, $suffix = '')
 {
     $symptom = SymptomGenerator::generateRelatedSymptom($questionnaire->getAboutYou()->getFeelings()->getNormalisedValues());
     $value = $questionnaire->getAboutYou()->getFeelings()->getNormalisedValues()[$symptom];
     if ($symptom !== 'weight') {
         $this->generateSymptomMessages($value, self::SECTION_NAME, $rag, $symptom, $suffix);
     } else {
         $gender = $suffix . '_' . Person::GENDER_FEMALE;
         if (RespondentIsMaleSpecification::isSatisfiedBy($questionnaire)) {
             $gender = $suffix . '_' . Person::GENDER_MALE;
         }
         $this->generateSymptomMessages($value, self::SECTION_NAME, $rag, $symptom, $gender);
     }
 }
 /**
  * @param Questionnaire $questionnaire
  */
 protected function buildAmberDrinkingBehaviours(Questionnaire $questionnaire)
 {
     switch (true) {
         case DrinkingExceeds14UnitsAnd5DaysSpecification::isSatisfiedBy($questionnaire):
             $prefix = '_gt_14_units_gte_6_days';
             break;
         case DrinkingExceeds14UnitsAndDoesNotExceed5DaysSpecification::isSatisfiedBy($questionnaire):
             $prefix = '_gt_14_units_lte_5_days';
             break;
         case DrinkingExceeds5DaysButNot14UnitsSpecification::isSatisfiedBy($questionnaire):
             $prefix = '_lte_14_units_gte_6_days';
             break;
         case DrinkingDoesNotExceed14UnitsAWeekButHasBingedSpecification::isSatisfiedBy($questionnaire):
             $prefix = '_lte_14_units_has_binge';
             break;
         default:
             $prefix = '_gte_3_units_lte_2_days';
             break;
     }
     if (RespondentIsMaleSpecification::isSatisfiedBy($questionnaire)) {
         $suffix = '_' . Person::GENDER_MALE;
     } else {
         $suffix = '_' . Person::GENDER_FEMALE;
     }
     $this->narrative->addMessages(self::SECTION_NAME, array(DrinkingNarrativeBuilder::SECTION_NAME => 'behaviours_drinking_amber' . $prefix . $suffix));
 }
 public function testSpecificationReturnsTrue()
 {
     $questionnaire = new Questionnaire(new Person());
     $questionnaire->getPerson()->setGender('male');
     $this->assertTrue($this->instance->isSatisfiedBy($questionnaire));
 }