[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,8 +466,10 @@ class StubLocale
*/ */
public static function setDefault($locale) public static function setDefault($locale)
{ {
if ('en' !== $locale) {
throw new MethodNotImplementedException(__METHOD__); 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');
}
} }