Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431154
LanguageSeTest.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
LanguageSeTest.php
View Options
<?php
/**
* @author Amir E. Aharoni
* @copyright Copyright © 2012, Amir E. Aharoni
* @file
*/
/**
* @group Language
*/
class
LanguageSeTest
extends
LanguageClassesTestCase
{
/**
* @dataProvider providePlural
* @covers \MediaWiki\Language\Language::convertPlural
*/
public
function
testPlural
(
$result
,
$value
)
{
$forms
=
[
'one'
,
'two'
,
'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
[
[
'other'
,
0
],
[
'one'
,
1
],
[
'two'
,
2
],
[
'other'
,
3
],
];
}
/**
* @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
[
[
'other'
,
0
],
[
'one'
,
1
],
[
'other'
,
2
],
[
'other'
,
3
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 20:08 (1 h, 57 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
77/03/6cafbf5114739e2809cad7a72041
Default Alt Text
LanguageSeTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment