public function testGetSetDrinksChoice() { $expected = uniqid(); $this->assertEmpty($this->instance->getDrinksChoice()); $this->assertInstanceOf(Eating::class, $this->instance->setDrinksChoice($expected)); $this->assertEquals($expected, $this->instance->getDrinksChoice()); }
/** * @param Eating $eating * @return int */ protected function calculateDrinksChoice(Eating $eating) { switch ($eating->getDrinksChoice()) { case 'sugary drink': return 1; default: return 0; } }
/** * @param Eating $eating * @return array */ public static function extractEating(Eating $eating) { return array("eatingProteinChoice" => $eating->getProteinChoice(), "eatingDrinksChoice" => $eating->getDrinksChoice(), "eatingPotatoesChoice" => $eating->getPotatoesChoice(), "eatingBreakfastChoice" => $eating->getBreakfastChoice(), "eatingCheeseChoice" => $eating->getCheeseChoice(), "eatingFruitAndVegChoice" => $eating->getFruitAndVegChoice(), "eatingDailySnackChoice" => $eating->getDailySnackChoice(), "eatingComplete" => $eating->isCompleted(), "eatingRag" => $eating->getRagScore()['rag']); }