Example #1
0
 public function testGetSetDob()
 {
     $this->person->setDob(new DateTime('1978-02-17'));
     $this->assertEquals('1978-02-17', $this->person->getDob()->format('Y-m-d'));
 }
Example #2
0
 /**
  * @param Person $person
  * @return array
  */
 public function toArray(Person $person)
 {
     $data = ['id' => $person->getId(), 'firstname' => $person->getFirstname(), 'middlename' => $person->getMiddlename(), 'lastname' => $person->getLastname(), 'aka' => $person->getAka(), 'dob' => $person->getDob(), 'birthplace' => $person->getBirthplace(), 'country' => $person->getCountry()];
     return $data;
 }