/** * @param string $code * @param Country $country * @return Region */ protected function createRegion($code, Country $country) { $result = new Region($country->getIso2Code() . '.' . $code); $result->setCode($code); return $result; }
/** * Get country ISO2 code * * @return Country */ public function getCountryIso2Code() { return $this->country ? $this->country->getIso2Code() : null; }
public function testConstructorData() { $obj = new Country('iso2Code'); $this->assertEquals('iso2Code', $obj->getIso2Code()); }