CodeExplorer numericCodeExists example
public function testGetNumericCode() { foreach (self::COUNTRIES
as $country) { $this->
assertSame(self::ALPHA2_TO_NUMERIC
[$country], Countries::
getNumericCode($country));
} } public function testNumericCodeExists() { $this->
assertTrue(Countries::
numericCodeExists('250'
));
$this->
assertTrue(Countries::
numericCodeExists('982'
));
$this->
assertTrue(Countries::
numericCodeExists('716'
));
$this->
assertTrue(Countries::
numericCodeExists('036'
));
$this->
assertFalse(Countries::
numericCodeExists('667'
));
} public function testGetAlpha2FromNumeric() { $alpha2Lookup =
array_flip(self::ALPHA2_TO_NUMERIC
);
foreach (self::ALPHA2_TO_NUMERIC
as $numeric) {