tests: rm duplicate code in language classes
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageTrTest.php
index a3cacc2..e4859df 100644 (file)
@@ -6,15 +6,7 @@
  */
 
 /** Tests for MediaWiki languages/LanguageTr.php */
-class LanguageTrTest extends MediaWikiTestCase {
-       private $lang;
-
-       protected function setUp() {
-               $this->lang = Language::factory( 'Tr' );
-       }
-       protected function tearDown() {
-               unset( $this->lang );
-       }
+class LanguageTrTest extends LanguageClassesTestCase {
 
        /**
         * See @bug 28040
@@ -27,9 +19,9 @@ class LanguageTrTest extends MediaWikiTestCase {
         */
        function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) {
                if( $func == 'ucfirst' ) {
-                       $res = $this->lang->ucfirst( $input );
+                       $res = $this->getLang()->ucfirst( $input );
                } elseif( $func == 'lcfirst' ) {
-                       $res = $this->lang->lcfirst( $input );
+                       $res = $this->getLang()->lcfirst( $input );
                } else {
                        throw new MWException( __METHOD__ . " given an invalid function name '$func'" );
                }