Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1427024
MediaWikiLangTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
889 B
Referenced Files
None
Subscribers
None
MediaWikiLangTestCase.php
View Options
<?php
use
MediaWiki\MainConfigNames
;
/**
* Base class that store and restore the Language objects
*/
abstract
class
MediaWikiLangTestCase
extends
MediaWikiIntegrationTestCase
{
/**
* The annotation causes this to be called immediately before setUp()
* @before
*/
final
protected
function
mediaWikiLangSetUp
():
void
{
$services
=
$this
->
getServiceContainer
();
$languageCode
=
$this
->
getConfVar
(
MainConfigNames
::
LanguageCode
);
$contLanguageCode
=
$services
->
getContentLanguage
()->
getCode
();
if
(
$languageCode
!==
$contLanguageCode
)
{
throw
new
RuntimeException
(
"Error in "
.
__METHOD__
.
': '
.
"
\$
wgLanguageCode ('$languageCode') is different from content language code "
.
"('$contLanguageCode')"
);
}
$this
->
setUserLang
(
'en'
);
// For mainpage to be 'Main Page'
$this
->
setContentLang
(
'en'
);
$services
->
getMessageCache
()->
disable
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 14:05 (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fe/eb/3460c0357e1c3fd043a49c8cc1f5
Default Alt Text
MediaWikiLangTestCase.php (889 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment