API tests are all subclasses of MediaWikiLangTestCase, which overrides
the content language when the tests are actually running. So we need to
always use 'en' to match that.
Bug: T162007
Change-Id: Ie001576fb62ae88c9141e471fd8fcbc49592be32
}
public static function provideApiErrorFormatterCreation() {
- global $wgContLang;
-
return [
'Default (BC)' => [ [], [
'uselang' => 'ru',
'uselang=content' => [
[ 'uselang' => 'content', 'errorformat' => 'plaintext' ],
[
- 'uselang' => $wgContLang->getCode(),
+ 'uselang' => 'en',
'class' => ApiErrorFormatter::class,
- 'lang' => $wgContLang->getCode(),
+ 'lang' => 'en',
'format' => 'plaintext',
'usedb' => false,
]
[
'uselang' => 'ru',
'class' => ApiErrorFormatter::class,
- 'lang' => $wgContLang->getCode(),
+ 'lang' => 'en',
'format' => 'plaintext',
'usedb' => false,
]