MediaWiki
REL1_19
|
00001 <?php 00009 class LanguageSmaTest extends MediaWikiTestCase { 00010 private $lang; 00011 00012 function setUp() { 00013 $this->lang = Language::factory( 'sma' ); 00014 } 00015 function tearDown() { 00016 unset( $this->lang ); 00017 } 00018 00020 function testPluralThreeForms( $result, $value ) { 00021 $forms = array( 'one', 'two', 'other' ); 00022 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); 00023 } 00024 00025 function providerPluralThreeForms() { 00026 return array ( 00027 array( 'other', 0 ), 00028 array( 'one', 1 ), 00029 array( 'two', 2 ), 00030 array( 'other', 3 ), 00031 ); 00032 } 00033 00035 function testPlural( $result, $value ) { 00036 $forms = array( 'one', 'other' ); 00037 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); 00038 } 00039 00040 function providerPlural() { 00041 return array ( 00042 array( 'other', 0 ), 00043 array( 'one', 1 ), 00044 array( 'other', 2 ), 00045 array( 'other', 3 ), 00046 ); 00047 } 00048 }