Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1428872
WikiPageMessageGroupTest.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
WikiPageMessageGroupTest.php
View Options
<?php
/**
* @author Abijeet Patro
* @license GPL-2.0-or-later
* @file
*/
use
MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroups
;
use
MediaWiki\Extension\Translate\Validation\ValidationRunner
;
/**
* @group medium
* @group Database
* @covers WikiPageMessageGroup
*/
class
WikiPageMessageGroupTest
extends
MediaWikiIntegrationTestCase
{
protected
function
setUp
():
void
{
parent
::
setUp
();
MessageGroups
::
singleton
()->
overrideGroupsForTesting
(
$this
->
getTestGroups
()
);
}
public
function
getTestGroups
():
array
{
$anotherPageMessageGroup
=
new
WikiPageMessageGroup
(
'anotherpageid'
,
'mypage'
);
$anotherPageMessageGroup
->
setLabel
(
'thelabel'
);
// Example
$anotherPageMessageGroup
->
setNamespace
(
5
);
// Example
$list
[
'anotherpageid'
]
=
$anotherPageMessageGroup
;
return
$list
;
}
public
function
testMessageValidator
()
{
$group
=
MessageGroups
::
getGroup
(
'anotherpageid'
);
$msgValidator
=
$group
->
getValidator
();
$this
->
assertInstanceOf
(
ValidationRunner
::
class
,
$msgValidator
,
'returns a valid object of ValidationRunner class.'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 16:46 (11 h, 18 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d1/16/0b2d87b591902e92653ae5f983bd
Default Alt Text
WikiPageMessageGroupTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment