MediaWiki  REL1_22
LanguageTest Class Reference
Inheritance diagram for LanguageTest:
Collaboration diagram for LanguageTest:

List of all members.

Public Member Functions

 testBuiltInCodeValidation ($code, $message= '')
 Test Language::isValidBuiltInCode() provideLanguageCodes Language::isValidBuiltInCode.
 testBuiltInCodeValidationRejectUnderscore ()
 Language::isValidBuiltInCode
 testCheckTitleEncoding ($s)
 provideCheckTitleEncodingData Language::checkTitleEncoding
 testCommafy ($number, $numbersWithCommas)
 Language::commafy() provideCommafyData
 testConvertPlural ($expected, $number, $forms)
 providePluralData Language::convertPlural
 testFormatBitrate ($bps, $expected, $msg)
 provideFormatBitrate Language::formatBitrate
 testFormatDuration ($duration, $expected, $intervals=array())
 provideFormatDuration Language::formatDuration
 testFormatSize ($size, $expected, $msg)
 provideFormatSizes Language::formatSize
 testFormatTimePeriod ($seconds, $format, $expected, $desc)
 provideFormattableTimes# Language::formatTimePeriod
 testGetNamespaceAliases ($languageCode, $subset)
 provideGetNamespaceAliases Language::getNamespaceAliases
 testGetParentLanguage ($code, $expected, $comment)
 provideGetParentLanguage Language::getParentLanguage
 testIsSupportedLanguage ($code, $expected, $comment)
 provideIsSupportedLanguage Language::isSupportedLanguage
 testKnownCldrLanguageTag ()
 Language::isKnownLanguageTag
 testKnownLanguageTag ($code, $message= '')
 Test Language::isKnownLanguageTag() provideKnownLanguageTags Language::isKnownLanguageTag.
 testLanguageConvertDoubleWidthToSingleWidth ()
 Language::convertDoubleWidth Language::normalizeForSearch
 testLenientLanguageTag ()
 Negative test for Language::isWellFormedLanguageTag() Language::isWellFormedLanguageTag.
 testListToText ()
 Language::listToText
 testMalformedLanguageTag ($code, $message= '')
 Negative test for Language::isWellFormedLanguageTag() provideMalformedLanguageTags Language::isWellFormedLanguageTag.
 testRomanNumerals ($num, $numerals)
 provideRomanNumeralsData Language::romanNumeral
 testSprintfDate ($format, $ts, $expected, $msg)
 provideSprintfDateSamples Language::sprintfDate
 testSprintfDateNotAllDigitTimestamp ()
 Test too short timestamp MWException Language::sprintfDate.
 testSprintfDateNoZone ($format, $ts, $expected, $ignore, $msg)
 sprintfDate should always use UTC when no zone is given.
 testSprintfDateTooLongTimestamp ()
 Test too long timestamp MWException Language::sprintfDate.
 testSprintfDateTooShortTimestamp ()
 Test too short timestamp MWException Language::sprintfDate.
 testSprintfDateTZ ($format, $ts, $ignore, $expected, $msg)
 sprintfDate should use passed timezone provideSprintfDateSamples Language::sprintfDate
 testTranslateBlockExpiry ($expectedData, $str, $desc)
 Language::translateBlockExpiry() provideTranslateBlockExpiry
 testTruncate ()
 Language::truncate
 testTruncateHtml ($len, $ellipsis, $input, $expected)
 provideHTMLTruncateData Language::truncateHTML
 testUnknownLanguageTag ($code, $message= '')
 Negative tests for Language::isKnownLanguageTag() provideUnKnownLanguageTags Language::isKnownLanguageTag.
 testWellFormedLanguageTag ($code, $message= '')
 Test Language::isWellFormedLanguageTag() provideWellFormedLanguageTags Language::isWellFormedLanguageTag.

Static Public Member Functions

static provideCheckTitleEncodingData ()
static provideCommafyData ()
static provideFormatBitrate ()
static provideFormatDuration ()
static provideFormatSizes ()
static provideFormattableTimes ()
static provideGetNamespaceAliases ()
static provideGetParentLanguage ()
static provideHTMLTruncateData ()
static provideIsSupportedLanguage ()
static provideKnownLanguageTags ()
static provideLanguageCodes ()
static provideMalformedLanguageTags ()
 The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer <[email protected]> and distributed as free software, under the GNU General Public Licence.
static providePluralData ()
static provideRomanNumeralsData ()
static provideSprintfDateSamples ()
static provideTranslateBlockExpiry ()
static provideUnknownLanguageTags ()
static provideWellFormedLanguageTags ()
 The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer <[email protected]> and distributed as free software, under the GNU General Public Licence.

Detailed Description

Definition at line 3 of file LanguageTest.php.


Member Function Documentation

Definition at line 1267 of file LanguageTest.php.

References array().

static LanguageTest::provideCommafyData ( ) [static]

Definition at line 1468 of file LanguageTest.php.

References array().

Definition at line 1057 of file LanguageTest.php.

References array().

Definition at line 1130 of file LanguageTest.php.

References array().

static LanguageTest::provideFormatSizes ( ) [static]

Definition at line 994 of file LanguageTest.php.

References array().

Definition at line 26 of file LanguageTest.php.

References array().

Definition at line 1555 of file LanguageTest.php.

References array().

Definition at line 1533 of file LanguageTest.php.

References array().

Returns:
array format is ($len, $ellipsis, $input, $expected)

Definition at line 261 of file LanguageTest.php.

References array().

Definition at line 1511 of file LanguageTest.php.

References array().

Definition at line 478 of file LanguageTest.php.

References array().

Definition at line 454 of file LanguageTest.php.

References array().

The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer <[email protected]> and distributed as free software, under the GNU General Public Licence.

http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html

Definition at line 387 of file LanguageTest.php.

References array().

static LanguageTest::providePluralData ( ) [static]

Definition at line 1388 of file LanguageTest.php.

References array().

Definition at line 1332 of file LanguageTest.php.

References array().

Definition at line 597 of file LanguageTest.php.

References array().

Definition at line 1439 of file LanguageTest.php.

References array().

Definition at line 512 of file LanguageTest.php.

References array().

The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer <[email protected]> and distributed as free software, under the GNU General Public Licence.

http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html

Definition at line 335 of file LanguageTest.php.

References array().

LanguageTest::testBuiltInCodeValidation ( code,
message = '' 
)

Test Language::isValidBuiltInCode() provideLanguageCodes Language::isValidBuiltInCode.

Definition at line 437 of file LanguageTest.php.

References Language\isValidBuiltInCode().

provideCheckTitleEncodingData Language::checkTitleEncoding

Definition at line 1259 of file LanguageTest.php.

References $s, and LanguageClassesTestCase\getLang().

LanguageTest::testCommafy ( number,
numbersWithCommas 
)

Language::commafy() provideCommafyData

Definition at line 1460 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testConvertPlural ( expected,
number,
forms 
)

providePluralData Language::convertPlural

Definition at line 1383 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testFormatBitrate ( bps,
expected,
msg 
)

provideFormatBitrate Language::formatBitrate

Definition at line 1049 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testFormatDuration ( duration,
expected,
intervals = array() 
)

provideFormatDuration Language::formatDuration

Definition at line 1122 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testFormatSize ( size,
expected,
msg 
)

provideFormatSizes Language::formatSize

Definition at line 986 of file LanguageTest.php.

References $size, and LanguageClassesTestCase\getLang().

LanguageTest::testFormatTimePeriod ( seconds,
format,
expected,
desc 
)

provideFormattableTimes# Language::formatTimePeriod

Definition at line 22 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testGetNamespaceAliases ( languageCode,
subset 
)

provideGetNamespaceAliases Language::getNamespaceAliases

Definition at line 1547 of file LanguageTest.php.

References as, and Language\factory().

LanguageTest::testGetParentLanguage ( code,
expected,
comment 
)

provideGetParentLanguage Language::getParentLanguage

Definition at line 1524 of file LanguageTest.php.

References $comment, and Language\factory().

LanguageTest::testIsSupportedLanguage ( code,
expected,
comment 
)

provideIsSupportedLanguage Language::isSupportedLanguage

Definition at line 1507 of file LanguageTest.php.

References $comment, and Language\isSupportedLanguage().

LanguageTest::testKnownLanguageTag ( code,
message = '' 
)

Test Language::isKnownLanguageTag() provideKnownLanguageTags Language::isKnownLanguageTag.

Definition at line 471 of file LanguageTest.php.

References Language\isKnownLanguageTag().

LanguageTest::testMalformedLanguageTag ( code,
message = '' 
)

Negative test for Language::isWellFormedLanguageTag() provideMalformedLanguageTags Language::isWellFormedLanguageTag.

Definition at line 374 of file LanguageTest.php.

References Language\isWellFormedLanguageTag().

LanguageTest::testRomanNumerals ( num,
numerals 
)

provideRomanNumeralsData Language::romanNumeral

Definition at line 1324 of file LanguageTest.php.

References Language\romanNumeral().

LanguageTest::testSprintfDate ( format,
ts,
expected,
msg 
)

provideSprintfDateSamples Language::sprintfDate

Definition at line 550 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testSprintfDateNoZone ( format,
ts,
expected,
ignore,
msg 
)

sprintfDate should always use UTC when no zone is given.

provideSprintfDateSamples Language::sprintfDate

Definition at line 563 of file LanguageTest.php.

References $res, and LanguageClassesTestCase\getLang().

LanguageTest::testSprintfDateTZ ( format,
ts,
ignore,
expected,
msg 
)

sprintfDate should use passed timezone provideSprintfDateSamples Language::sprintfDate

Definition at line 584 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testTranslateBlockExpiry ( expectedData,
str,
desc 
)

Language::translateBlockExpiry() provideTranslateBlockExpiry

Definition at line 1428 of file LanguageTest.php.

References LanguageClassesTestCase\getLang(), and list.

LanguageTest::testTruncateHtml ( len,
ellipsis,
input,
expected 
)

provideHTMLTruncateData Language::truncateHTML

Definition at line 250 of file LanguageTest.php.

References LanguageClassesTestCase\getLang().

LanguageTest::testUnknownLanguageTag ( code,
message = '' 
)

Negative tests for Language::isKnownLanguageTag() provideUnKnownLanguageTags Language::isKnownLanguageTag.

Definition at line 505 of file LanguageTest.php.

References Language\isKnownLanguageTag().

LanguageTest::testWellFormedLanguageTag ( code,
message = '' 
)

Test Language::isWellFormedLanguageTag() provideWellFormedLanguageTags Language::isWellFormedLanguageTag.

Definition at line 322 of file LanguageTest.php.

References Language\isWellFormedLanguageTag().


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