当前位置: 首页>>代码示例>>PHP>>正文


PHP IntlTestHelper::requireFullIntl方法代码示例

本文整理汇总了PHP中Symfony\Component\Intl\Util\IntlTestHelper::requireFullIntl方法的典型用法代码示例。如果您正苦于以下问题:PHP IntlTestHelper::requireFullIntl方法的具体用法?PHP IntlTestHelper::requireFullIntl怎么用?PHP IntlTestHelper::requireFullIntl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Intl\Util\IntlTestHelper的用法示例。


在下文中一共展示了IntlTestHelper::requireFullIntl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     IntlTestHelper::requireFullIntl($this);
     $this->context = $this->getMock('Symfony\\Component\\Validator\\ExecutionContext', array(), array(), '', false);
     $this->validator = new CurrencyValidator();
     $this->validator->initialize($this->context);
 }
开发者ID:NivalM,项目名称:VacantesJannaMotors,代码行数:7,代码来源:CurrencyValidatorTest.php

示例2: testWriteResourceBundle

 public function testWriteResourceBundle()
 {
     IntlTestHelper::requireFullIntl($this);
     $bundle = new \ResourceBundle('rb', __DIR__ . '/Fixtures', false);
     $this->writer->write($this->directory, 'en', $bundle);
     $this->assertFileEquals(__DIR__ . '/Fixtures/rb.php', $this->directory . '/en.php');
 }
开发者ID:tahermarkos,项目名称:Transport,代码行数:7,代码来源:PhpBundleWriterTest.php

示例3: setUp

 protected function setUp()
 {
     // we test against different locales, so we need the full
     // implementation
     IntlTestHelper::requireFullIntl($this);
     parent::setUp();
 }
开发者ID:xingshanghe,项目名称:symfony,代码行数:7,代码来源:MoneyTypeTest.php

示例4: testValidCurrenciesWithCountrySpecificLocale

 /**
  * @dataProvider getValidCurrencies
  **/
 public function testValidCurrenciesWithCountrySpecificLocale($currency)
 {
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('en_GB');
     $this->validator->validate($currency, new Currency());
     $this->assertNoViolation();
 }
开发者ID:Dren-x,项目名称:mobit,代码行数:10,代码来源:CurrencyValidatorTest.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     // we test against "de_DE", so we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_DE');
 }
开发者ID:xingshanghe,项目名称:symfony,代码行数:7,代码来源:NumberTypeTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     // we test against "de_AT", so we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_AT');
     $this->defaultTimezone = date_default_timezone_get();
 }
开发者ID:VincentMardon,项目名称:Links_list,代码行数:8,代码来源:DateTypeTest.php

示例7: testReverseTransform

 public function testReverseTransform()
 {
     // Since we test against "de_AT", we need the full implementation
     IntlTestHelper::requireFullIntl($this, false);
     \Locale::setDefault('de_AT');
     $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100);
     $this->assertEquals(123, $transformer->reverseTransform('1,23'));
 }
开发者ID:yceruto,项目名称:symfony,代码行数:8,代码来源:MoneyToLocalizedStringTransformerTest.php

示例8: getDateFormatter

 protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null)
 {
     IntlTestHelper::requireFullIntl($this, '55.1');
     if (!($formatter = new \IntlDateFormatter($locale, $datetype, $timetype, $timezone, $calendar, $pattern))) {
         throw new \InvalidArgumentException(intl_get_error_message());
     }
     return $formatter;
 }
开发者ID:yceruto,项目名称:symfony,代码行数:8,代码来源:IntlDateFormatterTest.php

示例9: testValidateUsingCountrySpecificLocale

 public function testValidateUsingCountrySpecificLocale()
 {
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('fr_FR');
     $existingLanguage = 'en';
     $this->validator->validate($existingLanguage, new Language(array('message' => 'aMessage')));
     $this->assertNoViolation();
 }
开发者ID:Dren-x,项目名称:mobit,代码行数:8,代码来源:LanguageValidatorTest.php

示例10: testReverseTransformWithPrecision

 public function testReverseTransformWithPrecision()
 {
     // Since we test against "de_AT", we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_AT');
     $transformer = new PercentToLocalizedStringTransformer(2);
     $this->assertEquals(0.1234, $transformer->reverseTransform('12,34'));
 }
开发者ID:d3ancole1995,项目名称:symfony,代码行数:8,代码来源:PercentToLocalizedStringTransformerTest.php

示例11: testValidateUsingCountrySpecificLocale

 public function testValidateUsingCountrySpecificLocale()
 {
     // in order to test with "en_GB"
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('en_GB');
     $existingCountry = 'GB';
     $this->validator->validate($existingCountry, new Country());
     $this->assertNoViolation();
 }
开发者ID:ayoah,项目名称:symfony,代码行数:9,代码来源:CountryValidatorTest.php

示例12: testValidateUsingCountrySpecificLocale

 public function testValidateUsingCountrySpecificLocale()
 {
     // in order to test with "en_GB"
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('en_GB');
     $existingCountry = 'GB';
     $this->context->expects($this->never())->method('addViolation');
     $this->validator->validate($existingCountry, new Country());
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:9,代码来源:CountryValidatorTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     // Since we test against "de_AT", we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_AT');
     $this->dateTime = new \DateTime('2010-02-03 04:05:06 UTC');
     $this->dateTimeWithoutSeconds = new \DateTime('2010-02-03 04:05:00 UTC');
 }
开发者ID:Ener-Getick,项目名称:symfony,代码行数:9,代码来源:DateTimeToLocalizedStringTransformerTest.php

示例14: testGetLocaleReturnsDefaultLocaleIfNotSet

 public function testGetLocaleReturnsDefaultLocaleIfNotSet()
 {
     // in order to test with "pt_BR"
     IntlTestHelper::requireFullIntl($this);
     $translator = new IdentityTranslator();
     \Locale::setDefault('en');
     $this->assertEquals('en', $translator->getLocale());
     \Locale::setDefault('pt_BR');
     $this->assertEquals('pt_BR', $translator->getLocale());
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:10,代码来源:IdentityTranslatorTest.php

示例15: testReverseTransformWithGrouping

 public function testReverseTransformWithGrouping()
 {
     // Since we test against "de_AT", we need the full implementation
     IntlTestHelper::requireFullIntl($this);
     \Locale::setDefault('de_AT');
     $transformer = new IntegerToLocalizedStringTransformer(null, true);
     $this->assertEquals(1234, $transformer->reverseTransform('1.234,5'));
     $this->assertEquals(12345, $transformer->reverseTransform('12.345,912'));
     $this->assertEquals(1234, $transformer->reverseTransform('1234,5'));
     $this->assertEquals(12345, $transformer->reverseTransform('12345,912'));
 }
开发者ID:d3ancole1995,项目名称:symfony,代码行数:11,代码来源:IntegerToLocalizedStringTransformerTest.php


注:本文中的Symfony\Component\Intl\Util\IntlTestHelper::requireFullIntl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。