X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Flanguages%2FLanguageUzTest.php;h=495c0be6233629389e3c9d7f7cb90aa81eb075dc;hb=88066420004931111290ed42ce9ee8f6e3a76c90;hp=0314649107ecedfdecc7559a6ebe7114468f0f08;hpb=22aeca2dfeb7efd3f15036cbb869d6e0b90bc3d8;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/languages/LanguageUzTest.php b/tests/phpunit/languages/LanguageUzTest.php index 0314649107..495c0be623 100644 --- a/tests/phpunit/languages/LanguageUzTest.php +++ b/tests/phpunit/languages/LanguageUzTest.php @@ -15,16 +15,7 @@ require_once dirname( __DIR__ ) . '/bootstrap.php'; /** Tests for MediaWiki languages/LanguageUz.php */ -class LanguageUzTest extends MediaWikiTestCase { - /* Language object. Initialized before each test */ - private $lang; - - protected function setUp() { - $this->lang = Language::factory( 'uz' ); - } - protected function tearDown() { - unset( $this->lang ); - } +class LanguageUzTest extends LanguageClassesTestCase { /** * @author Nikola Smolenski @@ -73,6 +64,7 @@ class LanguageUzTest extends MediaWikiTestCase { $msg ); } + /** * Wrapper to verify a text is different once converted to a variant. * @param $text string Text to convert @@ -96,6 +88,7 @@ class LanguageUzTest extends MediaWikiTestCase { $this->assertUnConverted( $text, 'uz-cyrl', $msg ); $this->assertConverted( $text, 'uz-latn', $msg ); } + /** * Verifiy the given Latin text is not converted when using * using the Latin variant and converted to Cyrillic when using @@ -109,11 +102,13 @@ class LanguageUzTest extends MediaWikiTestCase { /** Wrapper for converter::convertTo() method*/ function convertTo( $text, $variant ) { - return $this->lang->mConverter->convertTo( $text, $variant ); + return $this->getLang()->mConverter->convertTo( $text, $variant ); } + function convertToCyrillic( $text ) { return $this->convertTo( $text, 'uz-cyrl' ); } + function convertToLatin( $text ) { return $this->convertTo( $text, 'uz-latn' ); }