3 class LanguageBe_taraskTest
extends LanguageClassesTestCase
{
5 * Make sure the language code we are given is indeed
6 * be-tarask. This is to ensure LanguageClassesTestCase
7 * does not give us the wrong language.
9 public function testBeTaraskTestsUsesBeTaraskCode() {
10 $this->assertEquals( 'be-tarask',
11 $this->getLang()->getCode()
16 * @see bug 23156 & r64981
17 * @covers Language::commafy
19 public function testSearchRightSingleQuotationMarkAsApostroph() {
22 $this->getLang()->normalizeForSearch( '’' ),
23 'bug 23156: U+2019 conversion to U+0027'
28 * @see bug 23156 & r64981
29 * @covers Language::commafy
31 public function testCommafy() {
32 $this->assertEquals( '1,234,567', $this->getLang()->commafy( '1234567' ) );
33 $this->assertEquals( '12,345', $this->getLang()->commafy( '12345' ) );
37 * @see bug 23156 & r64981
38 * @covers Language::commafy
40 public function testDoesNotCommafyFourDigitsNumber() {
41 $this->assertEquals( '1234', $this->getLang()->commafy( '1234' ) );
45 * @dataProvider providePlural
46 * @covers Language::convertPlural
48 public function testPlural( $result, $value ) {
49 $forms = array( 'one', 'few', 'many', 'other' );
50 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
54 * @dataProvider providePlural
55 * @covers Language::getPluralRuleType
57 public function testGetPluralRuleType( $result, $value ) {
58 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
61 public static function providePlural() {
78 * @dataProvider providePluralTwoForms
79 * @covers Language::convertPlural
81 public function testPluralTwoForms( $result, $value ) {
82 $forms = array( 'one', 'other', '0=one' );
83 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
86 public static function providePluralTwoForms() {
92 array( 'other', 121 ),