diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageNsoTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageNsoTest.php | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/tests/phpunit/languages/LanguageNsoTest.php b/tests/phpunit/languages/LanguageNsoTest.php index ea393628..18efd736 100644 --- a/tests/phpunit/languages/LanguageNsoTest.php +++ b/tests/phpunit/languages/LanguageNsoTest.php @@ -6,27 +6,29 @@ */ /** Tests for MediaWiki languages/classes/LanguageNso.php */ -class LanguageNsoTest extends MediaWikiTestCase { - private $lang; - - function setUp() { - $this->lang = Language::factory( 'nso' ); - } - function tearDown() { - unset( $this->lang ); +class LanguageNsoTest extends LanguageClassesTestCase { + /** + * @dataProvider providePlural + * @covers Language::convertPlural + */ + public function testPlural( $result, $value ) { + $forms = array( 'one', 'other' ); + $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - /** @dataProvider providerPlural */ - function testPlural( $result, $value ) { - $forms = array( 'one', 'many' ); - $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); + /** + * @dataProvider providePlural + * @covers Language::getPluralRuleType + */ + public function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); } - function providerPlural() { - return array ( - array( 'one', 0 ), - array( 'one', 1 ), - array( 'many', 2 ), + public static function providePlural() { + return array( + array( 'one', 0 ), + array( 'one', 1 ), + array( 'other', 2 ), ); } } |