* @file
*/
-require_once dirname( dirname( __FILE__ ) ) . '/bootstrap.php';
+require_once dirname( __DIR__ ) . '/bootstrap.php';
/** Tests for MediaWiki languages/LanguageSr.php */
-class LanguageSrTest extends MediaWikiTestCase {
- /* Language object. Initialized before each test */
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'sr' );
- }
- function tearDown() {
- unset( $this->lang );
- }
+class LanguageSrTest extends LanguageClassesTestCase {
##### TESTS #######################################################
/** @dataProvider providePluralFourForms */
function testPluralFourForms( $result, $value ) {
$forms = array( 'one', 'few', 'many', 'other' );
- $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
function providePluralFourForms() {
/** @dataProvider providePluralTwoForms */
function testPluralTwoForms( $result, $value ) {
$forms = array( 'one', 'several' );
- $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
function providePluralTwoForms() {
return array (
/** Wrapper for converter::convertTo() method*/
function convertTo( $text, $variant ) {
- return $this
- ->lang
+ return $this->getLang()
->mConverter
->convertTo(
$text, $variant