예제 #1
0
 public function testGetScriptNames()
 {
     $scripts = array('Latn' => 'latin', 'Cyrl' => 'cyrillique');
     $this->reader->expects($this->once())->method('readEntry')->with($this->resDir, 'en', array('Scripts'))->will($this->returnValue($scripts));
     $sortedScripts = array('Cyrl' => 'cyrillique', 'Latn' => 'latin');
     $this->assertSame($sortedScripts, $this->bundle->getScriptNames('en'));
 }
 public function testLanguageBundle()
 {
     $bundle = new IcuLanguageBundle(new StructuredBundleReader(new BinaryBundleReader()));
     $this->assertSame('German', $bundle->getLanguageName('de', null, 'en'));
     $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());
 }
예제 #3
0
 public function testLanguageBundle()
 {
     $bundle = new IcuLanguageBundle(new StructuredBundleReader(new PhpBundleReader()));
     $this->assertSame('German', $bundle->getLanguageName('de', null, 'en'));
 }