3 // @codingStandardsIgnoreStart Ignore Squiz.Classes.ValidClassName.NotCamelCaps
5 * @covers LanguageBe_tarask
7 class LanguageBe_taraskTest
extends LanguageClassesTestCase
{
8 // @codingStandardsIgnoreEnd
10 * Make sure the language code we are given is indeed
11 * be-tarask. This is to ensure LanguageClassesTestCase
12 * does not give us the wrong language.
14 public function testBeTaraskTestsUsesBeTaraskCode() {
15 $this->assertEquals( 'be-tarask',
16 $this->getLang()->getCode()
21 * @see T25156 & r64981
22 * @covers Language::commafy
24 public function testSearchRightSingleQuotationMarkAsApostroph() {
27 $this->getLang()->normalizeForSearch( '’' ),
28 'T25156: U+2019 conversion to U+0027'
33 * @see T25156 & r64981
34 * @covers Language::commafy
36 public function testCommafy() {
37 $this->assertEquals( '1,234,567', $this->getLang()->commafy( '1234567' ) );
38 $this->assertEquals( '12,345', $this->getLang()->commafy( '12345' ) );
42 * @see T25156 & r64981
43 * @covers Language::commafy
45 public function testDoesNotCommafyFourDigitsNumber() {
46 $this->assertEquals( '1234', $this->getLang()->commafy( '1234' ) );
50 * @dataProvider providePlural
51 * @covers Language::convertPlural
53 public function testPlural( $result, $value ) {
54 $forms = [ 'one', 'few', 'many', 'other' ];
55 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
59 * @dataProvider providePlural
60 * @covers Language::getPluralRuleType
62 public function testGetPluralRuleType( $result, $value ) {
63 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
66 public static function providePlural() {
83 * @dataProvider providePluralTwoForms
84 * @covers Language::convertPlural
86 public function testPluralTwoForms( $result, $value ) {
87 $forms = [ '1=one', 'other' ];
88 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
91 public static function providePluralTwoForms() {