From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- .../Component/Icu/Tests/IcuIntegrationTest.php | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 vendor/symfony/icu/Symfony/Component/Icu/Tests/IcuIntegrationTest.php (limited to 'vendor/symfony/icu/Symfony/Component/Icu/Tests/IcuIntegrationTest.php') diff --git a/vendor/symfony/icu/Symfony/Component/Icu/Tests/IcuIntegrationTest.php b/vendor/symfony/icu/Symfony/Component/Icu/Tests/IcuIntegrationTest.php new file mode 100644 index 00000000..9fb65af3 --- /dev/null +++ b/vendor/symfony/icu/Symfony/Component/Icu/Tests/IcuIntegrationTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Icu\Tests; + +use Symfony\Component\Icu\IcuCurrencyBundle; +use Symfony\Component\Icu\IcuLanguageBundle; +use Symfony\Component\Icu\IcuLocaleBundle; +use Symfony\Component\Icu\IcuRegionBundle; +use Symfony\Component\Intl\ResourceBundle\Reader\PhpBundleReader; +use Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReader; + +/** + * Verifies that the data files can actually be read. + * + * @author Bernhard Schussek + */ +class IcuIntegrationTest extends \PHPUnit_Framework_TestCase +{ + public function testCurrencyBundle() + { + $bundle = new IcuCurrencyBundle(new StructuredBundleReader(new PhpBundleReader())); + + $this->assertSame('€', $bundle->getCurrencySymbol('EUR', 'en')); + } + + public function testLanguageBundle() + { + $bundle = new IcuLanguageBundle(new StructuredBundleReader(new PhpBundleReader())); + + $this->assertSame('German', $bundle->getLanguageName('de', null, 'en')); + } + + public function testLocaleBundle() + { + $bundle = new IcuLocaleBundle(new StructuredBundleReader(new PhpBundleReader())); + + $this->assertSame('Azerbaijani', $bundle->getLocaleName('az', 'en')); + } + + public function testRegionBundle() + { + $bundle = new IcuRegionBundle(new StructuredBundleReader(new PhpBundleReader())); + + $this->assertSame('United Kingdom', $bundle->getCountryName('GB', 'en')); + } +} -- cgit v1.2.3