本文整理汇总了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);
}
}