/** * {@inheritdoc} */ public function getCountryName($country, $locale = null) { if ('ZZ' === $country || ctype_digit((string) $country)) { return null; } return parent::getCountryName($country, $locale); }
public function testGetCountryName() { $this->reader->expects($this->once())->method('readEntry')->with(self::RES_DIR, 'en', array('Countries', 'AT'))->will($this->returnValue('Austria')); $this->assertSame('Austria', $this->bundle->getCountryName('AT', 'en')); }