public function testFromCountry()
 {
     $country = Country::fromIso31661Alpha2Code(Iso31661Alpha2Code::IT());
     $prefix = CountryPrefix::fromCountry($country);
     $this->assertSame(39, $prefix->value());
 }
Example #2
0
 /**
  * @inheritdoc.
  *
  * @param static $valueObject
  */
 public function sameValueAs(ValueObjectInterface $valueObject)
 {
     return $this->prefix->sameValueAs($valueObject->prefix()) && $this->lineNumber->sameValueAs($valueObject->lineNumber());
 }
Example #3
0
 /**
  * @inheritdoc.
  *
  * @param static $valueObject
  */
 public function sameValueAs(ValueObjectInterface $valueObject)
 {
     return $this->iso31661Alpha2Code->sameValueAs($valueObject->iso31661Alpha2Code()) && $this->iso31661Alpha3Code->sameValueAs($valueObject->iso31661Alpha3Code()) && $this->englishName->sameValueAs($valueObject->englishName()) && $this->phoneNumberPrefix->sameValueAs($valueObject->phoneNumberPrefix);
 }