/** * @expectedException \Budgegeria\IntlFormat\Exception\InvalidValueException * @dataProvider provideInvalidNumberValues */ public function testFormatValueNumberTypeCheck($value) { $messageFormatter = MessageFormatter::createNumberValueFormatter('en_US'); $messageFormatter->formatValue('integer', $value); }
/** * @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); }