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()); }
/** * @param Questionnaire $questionnaire * @return array */ protected function extractIdentifiableInformation(Questionnaire $questionnaire) { return array("entryReference" => $questionnaire->getId(), "dateCreated" => $questionnaire->getDateCreated()->format(\DateTime::ISO8601), "dateCompleted" => $questionnaire->getCompletedDate()->format(\DateTime::ISO8601)); }