public function testGetLocaleNames()
 {
     $locales = array('en_GB' => 'English (United Kingdom)', 'en_IE' => 'English (Ireland)', 'en_US' => 'English (United States)');
     $this->reader->expects($this->once())->method('readEntry')->with($this->resDir, 'en', array('Locales'))->will($this->returnValue($locales));
     $sortedLocales = array('en_IE' => 'English (Ireland)', 'en_GB' => 'English (United Kingdom)', 'en_US' => 'English (United States)');
     $this->assertSame($sortedLocales, $this->bundle->getLocaleNames('en'));
 }
 public function testLocaleBundle()
 {
     $bundle = new IcuLocaleBundle(new StructuredBundleReader(new BinaryBundleReader()));
     $this->assertSame('azéri', $bundle->getLocaleName('az', 'fr'));
     $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());
 }
Exemplo n.º 3
0
 public function testLocaleBundle()
 {
     $bundle = new IcuLocaleBundle(new StructuredBundleReader(new PhpBundleReader()));
     $this->assertSame('Azerbaijani', $bundle->getLocaleName('az', 'en'));
 }
 public function testLocaleBundle()
 {
     $bundle = new IcuLocaleBundle(new StructuredBundleReader(new BinaryBundleReader()));
     $this->assertSame('azéri', $bundle->getLocaleName('az', 'fr'));
 }