MediaWiki  master
LanguageSrTest Class Reference

LanguageSr SrConverter. More...

Inheritance diagram for LanguageSrTest:
Collaboration diagram for LanguageSrTest:

Public Member Functions

 testConversionToCyrillic ()
 
 testConversionToLatin ()
 LanguageConverter::convertTo. More...
 
 testEasyConversions ()
 LanguageConverter::convertTo. More...
 
 testGetPluralRuleType ( $result, $value)
 providePlural Language::getPluralRuleType More...
 
 testHasVariant ()
 Language::hasVariant. More...
 
 testHasVariantBogus ()
 Language::hasVariant. More...
 
 testHasVariants ()
 Language::hasVariants. More...
 
 testMixedConversions ()
 LanguageConverter::convertTo. More...
 
 testPlural ( $result, $value)
 providePlural Language::convertPlural More...
 
 testPluralTwoForms ( $result, $value)
 providePluralTwoForms Language::convertPlural More...
 
 testSameAmountOfLatinAndCyrillicGetConverted ()
 LanguageConverter::convertTo. More...
 

Static Public Member Functions

static providePlural ()
 
static providePluralTwoForms ()
 

Protected Member Functions

 assertConverted ( $text, $variant, $msg='')
 Wrapper to verify a text is different once converted to a variant. More...
 
 assertCyrillic ( $text, $msg='')
 Verifiy the given Cyrillic text is not converted when using using the Cyrillic variant and converted to Latin when using the Latin variant. More...
 
 assertLatin ( $text, $msg='')
 Verifiy the given Latin text is not converted when using using the Latin variant and converted to Cyrillic when using the Cyrillic variant. More...
 
 assertUnConverted ( $text, $variant, $msg='')
 Wrapper to verify text stay the same after applying conversion. More...
 
 convertTo ( $text, $variant)
 Wrapper for converter::convertTo() method. More...
 
 convertToCyrillic ( $text)
 
 convertToLatin ( $text)
 
- Protected Member Functions inherited from LanguageClassesTestCase
 getLang ()
 
 setUp ()
 Create a new language object before each test. More...
 
 tearDown ()
 Delete the internal language object so each test start out with a fresh language instance. More...
 

Detailed Description

LanguageSr SrConverter.

Definition at line 23 of file LanguageSrTest.php.

Member Function Documentation

◆ assertConverted()

LanguageSrTest::assertConverted (   $text,
  $variant,
  $msg = '' 
)
protected

Wrapper to verify a text is different once converted to a variant.

Parameters
string$textText to convert
string$variantLanguage variant 'sr-ec' or 'sr-el'
string$msgOptional message

Definition at line 262 of file LanguageSrTest.php.

References convertTo().

Referenced by assertCyrillic(), assertLatin(), and testSameAmountOfLatinAndCyrillicGetConverted().

◆ assertCyrillic()

LanguageSrTest::assertCyrillic (   $text,
  $msg = '' 
)
protected

Verifiy the given Cyrillic text is not converted when using using the Cyrillic variant and converted to Latin when using the Latin variant.

Parameters
string$textText to convert
string$msgOptional message

Definition at line 277 of file LanguageSrTest.php.

References assertConverted(), and assertUnConverted().

Referenced by testEasyConversions(), and testMixedConversions().

◆ assertLatin()

LanguageSrTest::assertLatin (   $text,
  $msg = '' 
)
protected

Verifiy the given Latin text is not converted when using using the Latin variant and converted to Cyrillic when using the Cyrillic variant.

Parameters
string$textText to convert
string$msgOptional message

Definition at line 289 of file LanguageSrTest.php.

References assertConverted(), and assertUnConverted().

Referenced by testEasyConversions(), and testMixedConversions().

◆ assertUnConverted()

LanguageSrTest::assertUnConverted (   $text,
  $variant,
  $msg = '' 
)
protected

Wrapper to verify text stay the same after applying conversion.

Parameters
string$textText to convert
string$variantLanguage variant 'sr-ec' or 'sr-el'
string$msgOptional message

Definition at line 248 of file LanguageSrTest.php.

References convertTo().

Referenced by assertCyrillic(), and assertLatin().

◆ convertTo()

LanguageSrTest::convertTo (   $text,
  $variant 
)
protected

Wrapper for converter::convertTo() method.

Definition at line 295 of file LanguageSrTest.php.

References LanguageClassesTestCase\getLang().

Referenced by assertConverted(), assertUnConverted(), convertToCyrillic(), and convertToLatin().

◆ convertToCyrillic()

LanguageSrTest::convertToCyrillic (   $text)
protected

Definition at line 303 of file LanguageSrTest.php.

References convertTo().

Referenced by testConversionToCyrillic().

◆ convertToLatin()

LanguageSrTest::convertToLatin (   $text)
protected

Definition at line 307 of file LanguageSrTest.php.

References convertTo().

Referenced by testConversionToLatin().

◆ providePlural()

static LanguageSrTest::providePlural ( )
static

Definition at line 205 of file LanguageSrTest.php.

◆ providePluralTwoForms()

static LanguageSrTest::providePluralTwoForms ( )
static

Definition at line 230 of file LanguageSrTest.php.

◆ testConversionToCyrillic()

LanguageSrTest::testConversionToCyrillic ( )
Author
Nikola Smolenski LanguageConverter::convertTo

Definition at line 127 of file LanguageSrTest.php.

References convertToCyrillic().

◆ testConversionToLatin()

LanguageSrTest::testConversionToLatin ( )

LanguageConverter::convertTo.

Definition at line 169 of file LanguageSrTest.php.

References convertToLatin().

◆ testEasyConversions()

LanguageSrTest::testEasyConversions ( )

LanguageConverter::convertTo.

Definition at line 84 of file LanguageSrTest.php.

References assertCyrillic(), and assertLatin().

◆ testGetPluralRuleType()

LanguageSrTest::testGetPluralRuleType (   $result,
  $value 
)

providePlural Language::getPluralRuleType

Definition at line 201 of file LanguageSrTest.php.

References $value, and LanguageClassesTestCase\getLang().

◆ testHasVariant()

LanguageSrTest::testHasVariant ( )

◆ testHasVariantBogus()

LanguageSrTest::testHasVariantBogus ( )

◆ testHasVariants()

LanguageSrTest::testHasVariants ( )

◆ testMixedConversions()

LanguageSrTest::testMixedConversions ( )

LanguageConverter::convertTo.

Definition at line 98 of file LanguageSrTest.php.

References assertCyrillic(), and assertLatin().

◆ testPlural()

LanguageSrTest::testPlural (   $result,
  $value 
)

providePlural Language::convertPlural

Definition at line 192 of file LanguageSrTest.php.

References $value, and LanguageClassesTestCase\getLang().

◆ testPluralTwoForms()

LanguageSrTest::testPluralTwoForms (   $result,
  $value 
)

providePluralTwoForms Language::convertPlural

Definition at line 225 of file LanguageSrTest.php.

References $value, and LanguageClassesTestCase\getLang().

◆ testSameAmountOfLatinAndCyrillicGetConverted()

LanguageSrTest::testSameAmountOfLatinAndCyrillicGetConverted ( )

LanguageConverter::convertTo.

Definition at line 112 of file LanguageSrTest.php.

References assertConverted().


The documentation for this class was generated from the following file: