4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Icu\Tests
;
14 use Symfony\Component\Icu\IcuCurrencyBundle
;
15 use Symfony\Component\Icu\IcuLanguageBundle
;
16 use Symfony\Component\Icu\IcuLocaleBundle
;
17 use Symfony\Component\Icu\IcuRegionBundle
;
18 use Symfony\Component\Intl\ResourceBundle\Reader\PhpBundleReader
;
19 use Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReader
;
22 * Verifies that the data files can actually be read.
24 * @author Bernhard Schussek <bschussek@gmail.com>
26 class IcuIntegrationTest
extends \PHPUnit_Framework_TestCase
28 public function testCurrencyBundle()
30 $bundle = new IcuCurrencyBundle(new StructuredBundleReader(new PhpBundleReader()));
32 $this->assertSame('€', $bundle->getCurrencySymbol('EUR', 'en'));
35 public function testLanguageBundle()
37 $bundle = new IcuLanguageBundle(new StructuredBundleReader(new PhpBundleReader()));
39 $this->assertSame('German', $bundle->getLanguageName('de', null, 'en'));
42 public function testLocaleBundle()
44 $bundle = new IcuLocaleBundle(new StructuredBundleReader(new PhpBundleReader()));
46 $this->assertSame('Azerbaijani', $bundle->getLocaleName('az', 'en'));
49 public function testRegionBundle()
51 $bundle = new IcuRegionBundle(new StructuredBundleReader(new PhpBundleReader()));
53 $this->assertSame('United Kingdom', $bundle->getCountryName('GB', 'en'));