示例#1
0
 /**
  * fromCountry.
  *
  * @param Country $country
  *
  * @return static
  */
 public static function fromCountry(Country $country)
 {
     $code = $country->iso31661Alpha2Code()->value();
     return static::fromIso31661Alpha2Code($code);
 }
 public function testFromCountry()
 {
     $country = Country::fromIso31661Alpha2Code(Iso31661Alpha2Code::IT());
     $prefix = CountryPrefix::fromCountry($country);
     $this->assertSame(39, $prefix->value());
 }