Returns country name
public static getName ( ValueObjects\Geography\CountryCode $code ) : ValueObjects\StringLiteral\StringLiteral | ||
$code | ValueObjects\Geography\CountryCode | |
return | ValueObjects\StringLiteral\StringLiteral |
public function testGetName() { $code = CountryCode::IT(); $name = CountryCodeName::getName($code); $expectedString = new StringLiteral('Italy'); $this->assertTrue($name->sameValueAs($expectedString)); }
/** * Returns country name * * @return String */ public function getName() { $code = $this->getCode(); $name = CountryCodeName::getName($code); return $name; }