/**
  * @expectedException \Budgegeria\IntlFormat\Exception\InvalidValueException
  * @dataProvider provideInvalidNumberValues
  */
 public function testFormatValueNumberTypeCheck($value)
 {
     $messageFormatter = MessageFormatter::createNumberValueFormatter('en_US');
     $messageFormatter->formatValue('integer', $value);
 }
예제 #2
0
 /**
  * @param string $locale
  * @return IntlFormat
  */
 public function createIntlFormat(string $locale) : IntlFormat
 {
     $formatter = [MessageFormatter::createDateValueFormatter($locale), MessageFormatter::createNumberValueFormatter($locale), new TimeZoneFormatter($locale), new LocaleFormatter($locale)];
     return new IntlFormat($formatter);
 }