Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4148589
MockMessageCollectionForExport.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MockMessageCollectionForExport.php
View Options
<?php
/**
* Mock class for unit tests
* @author Niklas Laxström
* @file
* @copyright Copyright © 2012-2013, Niklas Laxström
* @license GPL-2.0-or-later
*/
use
MediaWiki\Extension\Translate\MessageLoading\FatMessage
;
use
MediaWiki\Extension\Translate\MessageLoading\MessageCollection
;
/** This class can be used to test exporting of message groups. */
class
MockMessageCollectionForExport
extends
MessageCollection
{
public
function
__construct
()
{
$msg
=
new
FatMessage
(
'translatedmsg'
,
'definition'
);
$msg
->
setTranslation
(
'translation'
);
$this
->
messages
[
'translatedmsg'
]
=
$msg
;
$msg
=
new
FatMessage
(
'fuzzymsg'
,
'definition'
);
$msg
->
addTag
(
'fuzzy'
);
$msg
->
setTranslation
(
'!!FUZZY!!translation'
);
$this
->
messages
[
'fuzzymsg'
]
=
$msg
;
$msg
=
new
FatMessage
(
'untranslatedmsg'
,
'definition'
);
$this
->
messages
[
'untranslatedmsg'
]
=
$msg
;
$this
->
tags
=
[
'fuzzy'
=>
[
'fuzzymsg'
],
];
$this
->
keys
=
array_flip
(
array_keys
(
$this
->
messages
)
);
$this
->
code
=
'fi'
;
}
public
function
getAuthors
():
array
{
return
[
'Nike the bunny'
];
}
public
function
getLanguage
():
string
{
return
$this
->
code
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 18:51 (6 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
09/dd/9e5e63b1af4cd15b534e8cf2ba23
Default Alt Text
MockMessageCollectionForExport.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment