wiki.techinc.nl/tests/phpunit/languages
C. Scott Ananian fcbde8ae4e Make Language::hasVariant() more strict
In d59f27aeab we made
LanguageConverter::validateVariant() try harder to convert a variant
into an acceptable MediaWiki-internal form, looking at deprecated
codes and BCP 47 aliases.  However, this misled Language::hasVariant()
into thinking that bogus names (like all-uppercase strings) were
acceptable variant names, which then led exceptions when they were
passed to the various conversion methods.

This is a belt-and-suspenders patch for T207433 -- in that case we
shouldn't have created a Language object with code 'sr-cyrl' in the
first place, but once one was created we shouldn't have tried to
ask LanguageSr to convert texts to 'sr-cyrl'.  The latter problem
is fixed by this patch.

Bug: T207433
Change-Id: Id993bc7989144b5031a551662e8e492bd23f698a
2018-10-22 16:35:26 -04:00
..
classes Make Language::hasVariant() more strict 2018-10-22 16:35:26 -04:00
LanguageClassesTestCase.php Use static::class instead of get_called_class() 2016-02-29 22:43:58 +00:00
LanguageCodeTest.php Ensure LanguageCode::bcp47() returns a valid BCP 47 language code 2018-10-11 01:53:54 -04:00
LanguageConverterTest.php Merge "Accept BCP 47 codes as aliases for nonstandard variants" 2018-10-11 20:46:42 +00:00
LanguageTest.php Make Language::hasVariant() more strict 2018-10-22 16:35:26 -04:00
SpecialPageAliasTest.php Add @coversNothing to tests that don't cover specific PHP classes 2018-06-12 13:27:40 -07:00