public function testGetCountryNames() { $countries = array('DE' => 'Germany', 'AT' => 'Austria', 'ZZ' => 'Unknown Country', '010' => 'Europe', 110 => 'America'); $this->reader->expects($this->once())->method('readEntry')->with($this->resDir, 'en', array('Countries'))->will($this->returnValue($countries)); $sortedCountries = array('AT' => 'Austria', 'DE' => 'Germany'); $this->assertSame($sortedCountries, $this->bundle->getCountryNames('en')); }
public function testRegionBundle() { $bundle = new IcuRegionBundle(new StructuredBundleReader(new BinaryBundleReader())); $this->assertSame('Vereinigtes Königreich', $bundle->getCountryName('GB', 'de')); $this->assertContains('en_GB', $bundle->getLocales()); $this->assertContains('mo', $bundle->getLocales()); $this->assertContains('ro_MD', $bundle->getLocales()); $this->assertNotContains('root', $bundle->getLocales()); $this->assertNotContains('supplementalData', $bundle->getLocales()); $this->assertNotContains('supplementaldata', $bundle->getLocales()); $this->assertNotContains('misc', $bundle->getLocales()); }
public function testRegionBundle() { $bundle = new IcuRegionBundle(new StructuredBundleReader(new PhpBundleReader())); $this->assertSame('United Kingdom', $bundle->getCountryName('GB', 'en')); }
public function testRegionBundle() { $bundle = new IcuRegionBundle(new StructuredBundleReader(new BinaryBundleReader())); $this->assertSame('Vereinigtes Königreich', $bundle->getCountryName('GB', 'de')); }