summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageUzTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageUzTest.php')
-rw-r--r--tests/phpunit/languages/LanguageUzTest.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/phpunit/languages/LanguageUzTest.php b/tests/phpunit/languages/LanguageUzTest.php
index 495c0be6..13f57c16 100644
--- a/tests/phpunit/languages/LanguageUzTest.php
+++ b/tests/phpunit/languages/LanguageUzTest.php
@@ -10,17 +10,20 @@
* @copyright Copyright © 2012, Robin Pepermans
* @copyright Copyright © 2011, Antoine Musso <hashar at free dot fr>
* @file
+ *
+ * @todo methods in test class should be tidied:
+ * - Should be split into separate test methods and data providers
+ * - Tests for LanguageConverter and Language should probably be separate..
*/
-require_once dirname( __DIR__ ) . '/bootstrap.php';
-
/** Tests for MediaWiki languages/LanguageUz.php */
class LanguageUzTest extends LanguageClassesTestCase {
/**
* @author Nikola Smolenski
+ * @covers LanguageConverter::convertTo
*/
- function testConversionToCyrillic() {
+ public function testConversionToCyrillic() {
// A convertion of Latin to Cyrillic
$this->assertEquals( 'абвгғ',
$this->convertToCyrillic( 'abvggʻ' )
@@ -39,7 +42,10 @@ class LanguageUzTest extends LanguageClassesTestCase {
);
}
- function testConversionToLatin() {
+ /**
+ * @covers LanguageConverter::convertTo
+ */
+ public function testConversionToLatin() {
// A simple convertion of Latin to Latin
$this->assertEquals( 'abdef',
$this->convertToLatin( 'abdef' )
@@ -57,7 +63,7 @@ class LanguageUzTest extends LanguageClassesTestCase {
* @param $variant string Language variant 'uz-cyrl' or 'uz-latn'
* @param $msg string Optional message
*/
- function assertUnConverted( $text, $variant, $msg = '' ) {
+ protected function assertUnConverted( $text, $variant, $msg = '' ) {
$this->assertEquals(
$text,
$this->convertTo( $text, $variant ),
@@ -71,7 +77,7 @@ class LanguageUzTest extends LanguageClassesTestCase {
* @param $variant string Language variant 'uz-cyrl' or 'uz-latn'
* @param $msg string Optional message
*/
- function assertConverted( $text, $variant, $msg = '' ) {
+ protected function assertConverted( $text, $variant, $msg = '' ) {
$this->assertNotEquals(
$text,
$this->convertTo( $text, $variant ),
@@ -84,7 +90,7 @@ class LanguageUzTest extends LanguageClassesTestCase {
* using the cyrillic variant and converted to Latin when using
* the Latin variant.
*/
- function assertCyrillic( $text, $msg = '' ) {
+ protected function assertCyrillic( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'uz-cyrl', $msg );
$this->assertConverted( $text, 'uz-latn', $msg );
}
@@ -94,22 +100,22 @@ class LanguageUzTest extends LanguageClassesTestCase {
* using the Latin variant and converted to Cyrillic when using
* the Cyrillic variant.
*/
- function assertLatin( $text, $msg = '' ) {
+ protected function assertLatin( $text, $msg = '' ) {
$this->assertUnConverted( $text, 'uz-latn', $msg );
$this->assertConverted( $text, 'uz-cyrl', $msg );
}
/** Wrapper for converter::convertTo() method*/
- function convertTo( $text, $variant ) {
+ protected function convertTo( $text, $variant ) {
return $this->getLang()->mConverter->convertTo( $text, $variant );
}
- function convertToCyrillic( $text ) {
+ protected function convertToCyrillic( $text ) {
return $this->convertTo( $text, 'uz-cyrl' );
}
- function convertToLatin( $text ) {
+ protected function convertToLatin( $text ) {
return $this->convertTo( $text, 'uz-latn' );
}
}