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 function testBeTaraskTestsUsesBeTaraskCode() {
10 $this->assertEquals( 'be-tarask',
11 $this->getLang()->getCode()
15 /** see bug 23156 & r64981 */
16 function testSearchRightSingleQuotationMarkAsApostroph() {
19 $this->getLang()->normalizeForSearch( '’' ),
20 'bug 23156: U+2019 conversion to U+0027'
24 /** see bug 23156 & r64981 */
25 function testCommafy() {
26 $this->assertEquals( '1,234,567', $this->getLang()->commafy( '1234567' ) );
27 $this->assertEquals( '12,345', $this->getLang()->commafy( '12345' ) );
30 /** see bug 23156 & r64981 */
31 function testDoesNotCommafyFourDigitsNumber() {
32 $this->assertEquals( '1234', $this->getLang()->commafy( '1234' ) );
35 /** @dataProvider providePlural */
36 function testPlural( $result, $value ) {
37 $forms = array( 'one', 'few', 'many', 'other' );
38 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
41 /** @dataProvider providePlural */
42 function testGetPluralRuleType( $result, $value ) {
43 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
46 public static function providePlural() {
62 /** @dataProvider providePluralTwoForms */
63 function testPluralTwoForms( $result, $value ) {
64 $forms = array( 'one', 'other' );
65 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
68 public static function providePluralTwoForms() {
73 array( 'other', 121 ),