public function testSetLocaleFromHttpAccept() { $httpAccept = 'fr-fr,fr;q=0.8,en-us;q=0.6,en;q=0.4,de;q=0.2'; I18n::setLocale(Locale::acceptFromHttp($httpAccept)); $this->assertEquals('fr_FR', I18n::getLocale()); }
public function testTranslateAndPluralize() { $this->assertEquals('2 messages', I18n::translateAndPluralize('inbox', 2)); $this->assertEquals('2 messages', _p('inbox', 2)); }