本文整理匯總了PHP中TransformCore\PHE\HayApi\PersistenceBundle\Entity\Questionnaire::setAboutYou方法的典型用法代碼示例。如果您正苦於以下問題:PHP Questionnaire::setAboutYou方法的具體用法?PHP Questionnaire::setAboutYou怎麽用?PHP Questionnaire::setAboutYou使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TransformCore\PHE\HayApi\PersistenceBundle\Entity\Questionnaire
的用法示例。
在下文中一共展示了Questionnaire::setAboutYou方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetSetAboutYou
public function testGetSetAboutYou()
{
$expected = new AboutYou($this->instance);
$this->assertNotEmpty($this->instance->getAboutYou());
$this->assertTrue($this->instance->setAboutYou($expected) instanceof Questionnaire);
$this->assertEquals($expected, $this->instance->getAboutYou());
}
示例2: testIGetANonEmptyResultsNarrativeOnACompleteQuiz
public function testIGetANonEmptyResultsNarrativeOnACompleteQuiz()
{
$person = (new Person())->setFirstName('test')->setGender('female');
$completedDate = new \DateTime();
$questionnaire = new Questionnaire($person);
$aboutYou = $questionnaire->getAboutYou();
$aboutYou->getFeelings()->setCompletedDate($completedDate);
$aboutYou->getHindrances()->setCompletedDate($completedDate);
$aboutYou->getMotivations()->setCompletedDate($completedDate);
$aboutYou->getDependants()->setCompletedDate($completedDate);
$questionnaire->setAboutYou($aboutYou->setCompletedDate($completedDate));
$questionnaire->getDrinking()->setCompletedDate($completedDate);
$questionnaire->getEating()->setCompletedDate($completedDate);
$questionnaire->getMoving()->setCompletedDate($completedDate);
$questionnaire->getSmoking()->setCompletedDate($completedDate);
$results = ResultsNarrativeHelper::extractResultsNarrative($questionnaire, $this->translator);
foreach ($results as $result) {
$this->assertEquals(base64_encode(self::TRANS_STRING), $result);
}
}