public function testCurrencyBundle()
 {
     $bundle = new IcuCurrencyBundle(new StructuredBundleReader(new BinaryBundleReader()));
     $this->assertSame('€', $bundle->getCurrencySymbol('EUR'));
     $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.º 2
0
 public function testCurrencyBundle()
 {
     $bundle = new IcuCurrencyBundle(new StructuredBundleReader(new PhpBundleReader()));
     $this->assertSame('€', $bundle->getCurrencySymbol('EUR', 'en'));
 }
 public function testGetRoundingIncrementFromDefaultBlock()
 {
     $currencyData = array('USD' => array(1 => 456), 'DEFAULT' => array(1 => 123));
     $this->reader->expects($this->once())->method('readEntry')->with($this->resDir, 'misc', array('CurrencyMeta'))->will($this->returnValue($currencyData));
     $this->assertSame(123, $this->bundle->getRoundingIncrement('EUR'));
 }