public function testInvalidFormat() { $this->
expectException(InvalidArgumentException::
class);
(new IntlFormatter())->
formatIntl('{foo', 'en',
[2
]);
} public function testFormatWithNamedArguments() { if (version_compare(\INTL_ICU_VERSION, '4.8', '<'
)) { $this->
markTestSkipped('Format with named arguments can only be run with ICU 4.8 or higher and PHP >= 5.5'
);
} $chooseMessage = <<<'_MSG_'
{gender_of_host, select,
female {{num_guests, plural, offset:1
=0 {{host} does not give a party.}
=1 {{host} invites {guest} to her party.}
=2 {{host} invites {guest} and one other person to her party.}
other {{host} invites {guest} as one of the # people invited to her party.}}}
male {{num_guests, plural, offset:1
=0 {{host} does not give a party.}
=1 {{host} invites {guest} to his party.}
=2 {{host} invites {guest} and one other person to his party.}
other {{host} invites {guest} as one of the # people invited to his party.}}}
other {{num_guests, plural, offset:1
=0 {{host} does not give a party.}
=1 {{host} invites {guest} to their party.}
=2 {{host} invites {guest} and one other person to their party.}
other {{host} invites {guest} as one of the # people invited to their party.}}}}