[Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed

This commit is contained in:
Bernhard Schussek 2013-08-24 16:25:01 +02:00
parent b2cbc67289
commit d0faf5531d
2 changed files with 8 additions and 1 deletions

View File

@ -466,7 +466,9 @@ class StubLocale
*/ */
public static function setDefault($locale) public static function setDefault($locale)
{ {
throw new MethodNotImplementedException(__METHOD__); if ('en' !== $locale) {
throw new MethodNotImplementedException(__METHOD__);
}
} }
public static function getDataDirectory() public static function getDataDirectory()

View File

@ -252,4 +252,9 @@ class StubLocaleTest extends LocaleTestCase
{ {
StubLocale::setDefault('pt_BR'); StubLocale::setDefault('pt_BR');
} }
public function testSetDefaultAcceptsEn()
{
StubLocale::setDefault('en');
}
} }