Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5989060
LanguageIsv_latnTest.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
LanguageIsv_latnTest.php
View Options
<?php
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
/**
* @group Language
*/
class
LanguageIsv_latnTest
extends
LanguageClassesTestCase
{
// phpcs:enable
/**
* @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
[
[
'one'
,
1
],
[
'other'
,
11
],
[
'one'
,
91
],
[
'one'
,
121
],
[
'few'
,
2
],
[
'few'
,
3
],
[
'few'
,
4
],
[
'few'
,
334
],
[
'other'
,
5
],
[
'other'
,
15
],
[
'other'
,
120
],
];
}
/**
* @dataProvider providePluralTwoForms
* @covers \MediaWiki\Language\Language::convertPlural
*/
public
function
testPluralTwoForms
(
$result
,
$value
)
{
$forms
=
[
'one'
,
'other'
];
$this
->
assertEquals
(
$result
,
$this
->
getLang
()->
convertPlural
(
$value
,
$forms
)
);
}
public
static
function
providePluralTwoForms
()
{
return
[
[
'one'
,
1
],
[
'other'
,
11
],
[
'other'
,
4
],
[
'one'
,
91
],
[
'one'
,
121
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 4, 01:00 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c5/0b/f028721c9eeaecea73640607724a
Default Alt Text
LanguageIsv_latnTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment