Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5982539
LanguageMoTest.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
LanguageMoTest.php
View Options
<?php
/**
* @author Santhosh Thottingal
* @copyright Copyright © 2012, Santhosh Thottingal
* @file
*/
/**
* @group Language
*/
class
LanguageMoTest
extends
LanguageClassesTestCase
{
/**
* @dataProvider providePlural
* @covers \MediaWiki\Language\Language::convertPlural
*/
public
function
testPlural
(
$result
,
$value
)
{
$forms
=
[
'one'
,
'few'
,
'other'
];
$this
->
assertEquals
(
$result
,
$this
->
getLang
()->
convertPlural
(
$value
,
$forms
)
);
}
/**
* @dataProvider providePlural
* @covers \MediaWiki\Language\Language::getPluralRuleType
*/
public
function
testGetPluralRuleType
(
$result
,
$value
)
{
$this
->
assertEquals
(
$result
,
$this
->
getLang
()->
getPluralRuleType
(
$value
)
);
}
public
static
function
providePlural
()
{
return
[
[
'few'
,
0
],
[
'one'
,
1
],
[
'few'
,
2
],
[
'few'
,
19
],
[
'other'
,
20
],
[
'other'
,
99
],
[
'other'
,
100
],
[
'few'
,
101
],
[
'few'
,
119
],
[
'other'
,
120
],
[
'other'
,
200
],
[
'few'
,
201
],
[
'few'
,
219
],
[
'other'
,
220
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 22:24 (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f1/8d/0c2a5f9b4311ce176a7c5b11b5da
Default Alt Text
LanguageMoTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment