Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4097537
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
Tue, Aug 18, 14:55 (3 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b3/6e/c4979a1894d705d2ee36133b8b61
Default Alt Text
LanguageSeTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment