dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Send the full title to the 'nogomatch' debug log group"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
MediaWikiLangTestCase.php
diff --git
a/tests/phpunit/MediaWikiLangTestCase.php
b/tests/phpunit/MediaWikiLangTestCase.php
index
3034601
..
1131385
100644
(file)
--- a/
tests/phpunit/MediaWikiLangTestCase.php
+++ b/
tests/phpunit/MediaWikiLangTestCase.php
@@
-10,11
+10,15
@@
abstract class MediaWikiLangTestCase extends MediaWikiTestCase {
parent::setUp();
if ( $wgLanguageCode != $wgContLang->getCode() ) {
parent::setUp();
if ( $wgLanguageCode != $wgContLang->getCode() ) {
- throw new MWException("Error in MediaWikiLangTestCase::setUp(): " .
+ throw new MWException(
"Error in MediaWikiLangTestCase::setUp(): " .
"\$wgLanguageCode ('$wgLanguageCode') is different from " .
"\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
}
"\$wgLanguageCode ('$wgLanguageCode') is different from " .
"\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
}
+ // HACK: Call getLanguage() so the real $wgContLang is cached as the user language
+ // rather than our fake one. This is to avoid breaking other, unrelated tests.
+ RequestContext::getMain()->getLanguage();
+
$langCode = 'en'; # For mainpage to be 'Main Page'
$langObj = Language::factory( $langCode );
$langCode = 'en'; # For mainpage to be 'Main Page'
$langObj = Language::factory( $langCode );