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()); }
/** * @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; }