From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- tests/phpunit/languages/LanguageHeTest.php | 132 ----------------------------- 1 file changed, 132 deletions(-) delete mode 100644 tests/phpunit/languages/LanguageHeTest.php (limited to 'tests/phpunit/languages/LanguageHeTest.php') diff --git a/tests/phpunit/languages/LanguageHeTest.php b/tests/phpunit/languages/LanguageHeTest.php deleted file mode 100644 index c382244f..00000000 --- a/tests/phpunit/languages/LanguageHeTest.php +++ /dev/null @@ -1,132 +0,0 @@ -assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); - } - - /** - * @dataProvider provideThreePluralForms - * @covers Language::convertPlural - */ - public function testThreePluralForms( $result, $value ) { - $forms = array( 'one', 'two', 'other' ); - $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); - } - - /** - * @dataProvider provideFourPluralForms - * @covers Language::convertPlural - */ - public function testFourPluralForms( $result, $value ) { - $forms = array( 'one', 'two', 'many', 'other' ); - $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); - } - - /** - * @dataProvider provideFourPluralForms - * @covers Language::convertPlural - */ - public function testGetPluralRuleType( $result, $value ) { - $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); - } - - public static function provideTwoPluralForms() { - return array( - array( 'other', 0 ), // Zero - plural - array( 'one', 1 ), // Singular - array( 'other', 2 ), // No third form provided, use it as plural - array( 'other', 3 ), // Plural - other - array( 'other', 10 ), // No fourth form provided, use it as plural - array( 'other', 20 ), // No fourth form provided, use it as plural - ); - } - - public static function provideThreePluralForms() { - return array( - array( 'other', 0 ), // Zero - plural - array( 'one', 1 ), // Singular - array( 'two', 2 ), // Dual - array( 'other', 3 ), // Plural - other - array( 'other', 10 ), // No fourth form provided, use it as plural - array( 'other', 20 ), // No fourth form provided, use it as plural - ); - } - - public static function provideFourPluralForms() { - return array( - array( 'other', 0 ), // Zero - plural - array( 'one', 1 ), // Singular - array( 'two', 2 ), // Dual - array( 'other', 3 ), // Plural - other - array( 'other', 10 ), // 10 is supposed to be plural (other), not "many" - array( 'many', 20 ), // Fourth form provided - rare, but supported by CLDR - ); - } - - /** - * @dataProvider provideGrammar - * @covers Language::convertGrammar - */ - public function testGrammar( $result, $word, $case ) { - $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) ); - } - - // The comments in the beginning of the line help avoid RTL problems - // with text editors. - public static function provideGrammar() { - return array( - array( - /* result */'וויקיפדיה', - /* word */'ויקיפדיה', - /* case */'תחילית', - ), - array( - /* result */'וולפגנג', - /* word */'וולפגנג', - /* case */'prefixed', - ), - array( - /* result */'קובץ', - /* word */'הקובץ', - /* case */'תחילית', - ), - array( - /* result */'־Wikipedia', - /* word */'Wikipedia', - /* case */'תחילית', - ), - array( - /* result */'־1995', - /* word */'1995', - /* case */'תחילית', - ), - ); - } -} -- cgit v1.2.3-54-g00ecf