/**
  * @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;
 }
示例#2
0
 /**
  * Get country ISO2 code
  *
  * @return Country
  */
 public function getCountryIso2Code()
 {
     return $this->country ? $this->country->getIso2Code() : null;
 }
示例#3
0
 public function testConstructorData()
 {
     $obj = new Country('iso2Code');
     $this->assertEquals('iso2Code', $obj->getIso2Code());
 }