* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\Tests; use Symfony\Component\Intl\Intl; use PHPUnit\Framework\TestCase; class IntlTest extends TestCase { /** * @requires extension intl */ public function testIsExtensionLoadedChecksIfIntlExtensionIsLoaded() { $this->assertTrue(Intl::isExtensionLoaded()); } public function testGetCurrencyBundleCreatesTheCurrencyBundle() { $this->assertInstanceOf('Symfony\Component\Intl\ResourceBundle\CurrencyBundleInterface', Intl::getCurrencyBundle()); } public function testGetLanguageBundleCreatesTheLanguageBundle() { $this->assertInstanceOf('Symfony\Component\Intl\ResourceBundle\LanguageBundleInterface', Intl::getLanguageBundle()); } public function testGetLocaleBundleCreatesTheLocaleBundle() { $this->assertInstanceOf('Symfony\Component\Intl\ResourceBundle\LocaleBundleInterface', Intl::getLocaleBundle()); } public function testGetRegionBundleCreatesTheRegionBundle() { $this->assertInstanceOf('Symfony\Component\Intl\ResourceBundle\LocaleBundleInterface', Intl::getLocaleBundle()); } public function testGetIcuVersionReadsTheVersionOfInstalledIcuLibrary() { $this->assertStringMatchesFormat('%d.%d', Intl::getIcuVersion()); } public function testGetIcuDataVersionReadsTheVersionOfInstalledIcuData() { $this->assertStringMatchesFormat('%d.%d', Intl::getIcuDataVersion()); } public function testGetIcuStubVersionReadsTheVersionOfBundledStubs() { $this->assertStringMatchesFormat('%d.%d', Intl::getIcuStubVersion()); } public function testGetDataDirectoryReturnsThePathToIcuData() { $this->assertTrue(is_dir(Intl::getDataDirectory())); } /** * @requires extension intl */ public function testLocaleAliasesAreLoaded() { \Locale::setDefault('zh_TW'); $countryNameZhTw = Intl::getRegionBundle()->getCountryName('AD'); \Locale::setDefault('zh_Hant_TW'); $countryNameHantZhTw = Intl::getRegionBundle()->getCountryName('AD'); \Locale::setDefault('zh'); $countryNameZh = Intl::getRegionBundle()->getCountryName('AD'); $this->assertSame($countryNameZhTw, $countryNameHantZhTw, 'zh_TW is an alias to zh_Hant_TW'); $this->assertNotSame($countryNameZh, $countryNameZhTw, 'zh_TW does not fall back to zh'); } } __halt_compiler();----SIGNATURE:----Ivucwu0vHMOrHsz7dT1m6oupxUHCNQ2xZCs1NHaHP6M4UyXLEfI1CpcsCXm+AptiwwxZhEAaTTf7ygUQY8oPC7/RtLsQcwnkoOfBPrUMD8hEzziwRit4NHXNT8iWpTek8hQ4ZY+NYC+H97ssMFAP1GMWydRlbyIYwuUvMLHJC1VyE2H5qrE2sWsEGmC2FoqGB+FaGaOR182sDniQg0R1j7rB1sCpi6Daetbmwz7eN/h+WoVerPbGaW/zvPVMkv/ngoqZQEMAsoPuhwjlnLlSqoenzyKQ70uEZzgSxhi+3Q4nFjkxPfVdvLJQHfUz6gnULCQeAjfU+1MAYbPOtfT8xqC/5Kux2mk4JK76pmr0yYu1ATc+N1Nerd2rx6PfKqLiyTsRoLAENlqJX3StYxOqAAJvqtsF2JeOO5Rb681OCOIR/AB9DbsuM2gU4dUeYBNbKULGrkfxGcTlUjuLL//bv548SSKnQeX4RvDn5JETYrhLL4S8WagRgWVVMcL/9HjURKRuBGEyOHgefZhoOTEvMHRgCDo8DKTJjdgn2ElhLU2O4jcLNxhqQgh5fraHDVnhlOv6v1DhBY7Etf8cPek5KTYY3MVLjNOINYxvwAjz9TJpnOfPQWY8+ot7YPF6TX8IqF2UCcQzI+JTUpOQwQddLezFY+C0k6r35lHiBlfZQSk=----ATTACHMENT:----ODU0MjY2ODUyMjEyODgwOSA4NTMyODI0ODYzOTg3NTcyIDg5NzM1MDUyNjQwMzgzMDk=