diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index 7465aa28b5..1352f317b3 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -466,7 +466,9 @@ class StubLocale */ public static function setDefault($locale) { - throw new MethodNotImplementedException(__METHOD__); + if ('en' !== $locale) { + throw new MethodNotImplementedException(__METHOD__); + } } public static function getDataDirectory() diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php index d9e79dc517..e9c1e0f94a 100644 --- a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php +++ b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php @@ -252,4 +252,9 @@ class StubLocaleTest extends LocaleTestCase { StubLocale::setDefault('pt_BR'); } + + public function testSetDefaultAcceptsEn() + { + StubLocale::setDefault('en'); + } }