[Locale] Fixed: Locale::setDefault() throws no exception when "en" is passed
Conflicts: src/Symfony/Component/Locale/Stub/StubLocale.php src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
This commit is contained in:
parent
6610a7c80e
commit
e1f40f28c5
@ -312,6 +312,8 @@ class Locale
|
||||
*/
|
||||
public static function setDefault($locale)
|
||||
{
|
||||
throw new MethodNotImplementedException(__METHOD__);
|
||||
if ('en' !== $locale) {
|
||||
throw new MethodNotImplementedException(__METHOD__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,6 +150,11 @@ class LocaleTest extends AbstractLocaleTest
|
||||
$this->call('setDefault', 'pt_BR');
|
||||
}
|
||||
|
||||
public function testSetDefaultAcceptsEn()
|
||||
{
|
||||
$this->call('setDefault', 'en');
|
||||
}
|
||||
|
||||
protected function call($methodName)
|
||||
{
|
||||
$args = array_slice(func_get_args(), 1);
|
||||
|
Reference in New Issue
Block a user