本文整理汇总了PHP中TransformCore\PHE\HayApi\PersistenceBundle\Entity\Questionnaire::setDateCreated方法的典型用法代码示例。如果您正苦于以下问题:PHP Questionnaire::setDateCreated方法的具体用法?PHP Questionnaire::setDateCreated怎么用?PHP Questionnaire::setDateCreated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformCore\PHE\HayApi\PersistenceBundle\Entity\Questionnaire
的用法示例。
在下文中一共展示了Questionnaire::setDateCreated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetSetDateCreated
public function testGetSetDateCreated()
{
$expected = new \DateTime();
$this->assertNotEmpty($this->instance->getDateCreated());
$this->assertTrue($this->instance->getDateCreated() instanceof \DateTime);
$this->assertTrue($this->instance->setDateCreated($expected) instanceof Questionnaire);
$this->assertEquals($expected, $this->instance->getDateCreated());
}
示例2: generateFemaleOption
/**
* @inheritdoc
*/
protected function generateFemaleOption()
{
$person = new Person();
$person->setGender(Person::GENDER_FEMALE)->setFirstName('Patti')->setLastName('Cline')->setAge(65);
$questionnaire = new Questionnaire($person);
$questionnaire->setDateCreated($this->creationDate)->getAboutYou()->getFeelings()->setEnergy(100)->setWeight(60)->setMood(75)->setFatigue(10)->setFitness(10)->setStress(25)->setCompletedDate($this->creationDate);
$questionnaire->getAboutYou()->getHindrances()->setNotRelevant(true)->setCompletedDate($this->creationDate);
$questionnaire->getAboutYou()->getMotivations()->setAppearance(true)->setCompletedDate($this->creationDate);
$questionnaire->getAboutYou()->getDependants()->setGrandChildren(true)->setCompletedDate($this->creationDate);
return $questionnaire;
}