MediaWiki  master
LanguageUzTest Class Reference

LanguageUz UzConverter. More...

Inheritance diagram for LanguageUzTest:
Collaboration diagram for LanguageUzTest:

Public Member Functions

 testConversionToCyrillic ()
 
 testConversionToLatin ()
 LanguageConverter::convertTo. More...
 

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

LanguageUz UzConverter.

Definition at line 23 of file LanguageUzTest.php.

Member Function Documentation

◆ assertConverted()

LanguageUzTest::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 'uz-cyrl' or 'uz-latn'
string$msgOptional message

Definition at line 84 of file LanguageUzTest.php.

References convertTo().

Referenced by assertCyrillic(), and assertLatin().

◆ assertCyrillic()

LanguageUzTest::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 99 of file LanguageUzTest.php.

References assertConverted(), and assertUnConverted().

◆ assertLatin()

LanguageUzTest::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 111 of file LanguageUzTest.php.

References assertConverted(), and assertUnConverted().

◆ assertUnConverted()

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

Wrapper to verify text stay the same after applying conversion.

Parameters
string$textText to convert
string$variantLanguage variant 'uz-cyrl' or 'uz-latn'
string$msgOptional message

Definition at line 70 of file LanguageUzTest.php.

References convertTo().

Referenced by assertCyrillic(), and assertLatin().

◆ convertTo()

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

Wrapper for converter::convertTo() method.

Definition at line 117 of file LanguageUzTest.php.

References LanguageClassesTestCase\getLang().

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

◆ convertToCyrillic()

LanguageUzTest::convertToCyrillic (   $text)
protected

Definition at line 121 of file LanguageUzTest.php.

References convertTo().

Referenced by testConversionToCyrillic().

◆ convertToLatin()

LanguageUzTest::convertToLatin (   $text)
protected

Definition at line 125 of file LanguageUzTest.php.

References convertTo().

Referenced by testConversionToLatin().

◆ testConversionToCyrillic()

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

Definition at line 29 of file LanguageUzTest.php.

References convertToCyrillic().

◆ testConversionToLatin()

LanguageUzTest::testConversionToLatin ( )

LanguageConverter::convertTo.

Definition at line 51 of file LanguageUzTest.php.

References convertToLatin().


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