Пример #1
0
 public function testGetSetCountry()
 {
     $country = CountryFactory::generate('GBR');
     $this->person->setCountry($country);
     $this->assertInstanceOf('Del\\Entity\\Country', $this->person->getCountry());
     $this->assertEquals('GBR', $this->person->getCountry()->getId());
 }
Пример #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;
 }