MediaWiki
1.23.2
|
Public Member Functions | |
testBuiltInCodeValidation ( $code, $message='') | |
Test Language::isValidBuiltInCode() @dataProvider provideLanguageCodes @covers Language::isValidBuiltInCode. More... | |
testBuiltInCodeValidationRejectUnderscore () | |
@covers Language::isValidBuiltInCode More... | |
testCheckTitleEncoding ( $s) | |
@dataProvider provideCheckTitleEncodingData @covers Language::checkTitleEncoding More... | |
testCommafy ( $number, $numbersWithCommas) | |
@covers Language::commafy() @dataProvider provideCommafyData More... | |
testConvertPlural ( $expected, $number, $forms) | |
@dataProvider providePluralData @covers Language::convertPlural More... | |
testFormatBitrate ( $bps, $expected, $msg) | |
@dataProvider provideFormatBitrate @covers Language::formatBitrate More... | |
testFormatDuration ( $duration, $expected, $intervals=array()) | |
@dataProvider provideFormatDuration @covers Language::formatDuration More... | |
testFormatSize ( $size, $expected, $msg) | |
@dataProvider provideFormatSizes @covers Language::formatSize More... | |
testFormatTimePeriod ( $seconds, $format, $expected, $desc) | |
@dataProvider provideFormattableTimes# @covers Language::formatTimePeriod More... | |
testGetNamespaceAliases ( $languageCode, $subset) | |
@dataProvider provideGetNamespaceAliases @covers Language::getNamespaceAliases More... | |
testGetParentLanguage ( $code, $expected, $comment) | |
@dataProvider provideGetParentLanguage @covers Language::getParentLanguage More... | |
testIsSupportedLanguage ( $code, $expected, $comment) | |
@dataProvider provideIsSupportedLanguage @covers Language::isSupportedLanguage More... | |
testKnownCldrLanguageTag () | |
@covers Language::isKnownLanguageTag More... | |
testKnownLanguageTag ( $code, $message='') | |
Test Language::isKnownLanguageTag() @dataProvider provideKnownLanguageTags @covers Language::isKnownLanguageTag. More... | |
testLanguageConvertDoubleWidthToSingleWidth () | |
@covers Language::convertDoubleWidth @covers Language::normalizeForSearch More... | |
testLenientLanguageTag () | |
Negative test for Language::isWellFormedLanguageTag() @covers Language::isWellFormedLanguageTag. More... | |
testListToText () | |
@covers Language::listToText More... | |
testMalformedLanguageTag ( $code, $message='') | |
Negative test for Language::isWellFormedLanguageTag() @dataProvider provideMalformedLanguageTags @covers Language::isWellFormedLanguageTag. More... | |
testRomanNumerals ( $num, $numerals) | |
@dataProvider provideRomanNumeralsData @covers Language::romanNumeral More... | |
testSprintfDate ( $format, $ts, $expected, $msg) | |
@dataProvider provideSprintfDateSamples @covers Language::sprintfDate More... | |
testSprintfDateNotAllDigitTimestamp () | |
Test too short timestamp @expectedException MWException @covers Language::sprintfDate. More... | |
testSprintfDateNoZone ( $format, $ts, $expected, $ignore, $msg) | |
sprintfDate should always use UTC when no zone is given. More... | |
testSprintfDateTooLongTimestamp () | |
Test too long timestamp @expectedException MWException @covers Language::sprintfDate. More... | |
testSprintfDateTooShortTimestamp () | |
Test too short timestamp @expectedException MWException @covers Language::sprintfDate. More... | |
testSprintfDateTZ ( $format, $ts, $ignore, $expected, $msg) | |
sprintfDate should use passed timezone @dataProvider provideSprintfDateSamples @covers Language::sprintfDate More... | |
testTranslateBlockExpiry ( $expectedData, $str, $desc) | |
@covers Language::translateBlockExpiry() @dataProvider provideTranslateBlockExpiry More... | |
testTruncate () | |
@covers Language::truncate More... | |
testTruncateHtml ( $len, $ellipsis, $input, $expected) | |
@dataProvider provideHTMLTruncateData @covers Language::truncateHTML More... | |
testUnknownLanguageTag ( $code, $message='') | |
Negative tests for Language::isKnownLanguageTag() @dataProvider provideUnKnownLanguageTags @covers Language::isKnownLanguageTag. More... | |
testWellFormedLanguageTag ( $code, $message='') | |
Test Language::isWellFormedLanguageTag() @dataProvider provideWellFormedLanguageTags @covers Language::isWellFormedLanguageTag. More... | |
Public Member Functions inherited from MediaWikiTestCase | |
__call ( $func, $args) | |
__construct ( $name=null, array $data=array(), $dataName='') | |
addDBData () | |
Stub. More... | |
dbPrefix () | |
getCliArg ( $offset) | |
hideDeprecated ( $function) | |
Don't throw a warning if $function is deprecated and called later. More... | |
needsDB () | |
run (PHPUnit_Framework_TestResult $result=null) | |
setCliArg ( $offset, $value) | |
testMediaWikiTestCaseParentSetupCalled () | |
Make sure MediaWikiTestCase extending classes have called their parent setUp method. More... | |
usesTemporaryTables () | |
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 bortz and distributed as free software, under the GNU General Public Licence. meye r@nic .frMore... | |
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 bortz and distributed as free software, under the GNU General Public Licence. meye r@nic .frMore... | |
Static Public Member Functions inherited from MediaWikiTestCase | |
static | listTables ( $db) |
static | setupTestDB (DatabaseBase $db, $prefix) |
Creates an empty skeleton of the wiki database by cloning its structure to equivalent tables using the given $prefix. More... | |
static | teardownTestDB () |
Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. More... | |
Additional Inherited Members | |
Public Attributes inherited from MediaWikiTestCase | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. More... | |
const | ORA_DB_PREFIX = 'ut_' |
Static Public Attributes inherited from MediaWikiTestCase | |
static | $users |
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... | |
Protected Member Functions inherited from MediaWikiTestCase | |
arrayWrap (array $elements) | |
Utility method taking an array of elements and wrapping each element in it's own array. More... | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. More... | |
assertException ( $code, $expected='Exception', $message='') | |
Asserts that an exception of the specified type occurs when running the provided code. More... | |
assertHTMLEquals ( $expected, $actual, $msg='') | |
Put each HTML element on its own line and then equals() the results. More... | |
assertSelect ( $table, $fields, $condition, array $expectedRows) | |
Asserts that the given database query yields the rows given by $expectedRows. More... | |
assertType ( $type, $actual, $message='') | |
Asserts the type of the provided value. More... | |
assertTypeOrValue ( $type, $actual, $value=false, $message='') | |
Asserts that the provided variable is of the specified internal type or equals the $value argument. More... | |
assertValidHtmlDocument ( $html) | |
Asserts that the given string is valid HTML document. More... | |
assertValidHtmlSnippet ( $html) | |
Asserts that the given string is a valid HTML snippet. More... | |
checkDbIsSupported () | |
checkHasDiff3 () | |
Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. More... | |
checkHasGzip () | |
Check whether we have the 'gzip' commandline utility, will skip the test whenever "gzip -V" fails. More... | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. More... | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. More... | |
getNewTempDirectory () | |
obtains a new temporary directory More... | |
getNewTempFile () | |
Obtains a new temporary file name. More... | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. More... | |
mergeMwGlobalArrayValue ( $name, $values) | |
Merges the given values into a MW global array variable. More... | |
objectAssociativeSort (array &$array) | |
Does an associative sort that works for objects. More... | |
setMwGlobals ( $pairs, $value=null) | |
stashMwGlobals ( $globalKeys) | |
Stashes the global, will be restored in tearDown() More... | |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. More... | |
Protected Attributes inherited from MediaWikiTestCase | |
DatabaseBase | $db |
array | $supportedDBs |
array | $tablesUsed = array() |
Definition at line 3 of file LanguageTest.php.
|
static |
Definition at line 1286 of file LanguageTest.php.
References array().
|
static |
Definition at line 1487 of file LanguageTest.php.
References array().
|
static |
Definition at line 1077 of file LanguageTest.php.
References array().
|
static |
Definition at line 1149 of file LanguageTest.php.
References array().
|
static |
Definition at line 1014 of file LanguageTest.php.
References array().
|
static |
Definition at line 26 of file LanguageTest.php.
References array().
|
static |
Definition at line 1577 of file LanguageTest.php.
|
static |
Definition at line 1555 of file LanguageTest.php.
References array().
|
static |
Definition at line 281 of file LanguageTest.php.
References array().
|
static |
Definition at line 1533 of file LanguageTest.php.
References array().
|
static |
Definition at line 498 of file LanguageTest.php.
References array().
|
static |
Definition at line 474 of file LanguageTest.php.
References array().
|
static |
The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer bortz and distributed as free software, under the GNU General Public Licence. meye r@nic .fr
http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
Definition at line 407 of file LanguageTest.php.
References array().
|
static |
Definition at line 1407 of file LanguageTest.php.
References array().
|
static |
Definition at line 1351 of file LanguageTest.php.
References array().
|
static |
Definition at line 617 of file LanguageTest.php.
References array().
|
static |
Definition at line 1458 of file LanguageTest.php.
References array().
|
static |
Definition at line 532 of file LanguageTest.php.
References array().
|
static |
The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer bortz and distributed as free software, under the GNU General Public Licence. meye r@nic .fr
http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
Definition at line 355 of file LanguageTest.php.
References array().
LanguageTest::testBuiltInCodeValidation | ( | $code, | |
$message = '' |
|||
) |
Test Language::isValidBuiltInCode() @dataProvider provideLanguageCodes @covers Language::isValidBuiltInCode.
Definition at line 457 of file LanguageTest.php.
References Language\isValidBuiltInCode().
LanguageTest::testBuiltInCodeValidationRejectUnderscore | ( | ) |
@covers Language::isValidBuiltInCode
Definition at line 467 of file LanguageTest.php.
References Language\isValidBuiltInCode().
LanguageTest::testCheckTitleEncoding | ( | $s | ) |
@dataProvider provideCheckTitleEncodingData @covers Language::checkTitleEncoding
Definition at line 1278 of file LanguageTest.php.
References $s, and LanguageClassesTestCase\getLang().
LanguageTest::testCommafy | ( | $number, | |
$numbersWithCommas | |||
) |
@covers Language::commafy() @dataProvider provideCommafyData
Definition at line 1479 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testConvertPlural | ( | $expected, | |
$number, | |||
$forms | |||
) |
@dataProvider providePluralData @covers Language::convertPlural
Definition at line 1402 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testFormatBitrate | ( | $bps, | |
$expected, | |||
$msg | |||
) |
@dataProvider provideFormatBitrate @covers Language::formatBitrate
Definition at line 1069 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testFormatDuration | ( | $duration, | |
$expected, | |||
$intervals = array() |
|||
) |
@dataProvider provideFormatDuration @covers Language::formatDuration
Definition at line 1141 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testFormatSize | ( | $size, | |
$expected, | |||
$msg | |||
) |
@dataProvider provideFormatSizes @covers Language::formatSize
Definition at line 1006 of file LanguageTest.php.
References $size, and LanguageClassesTestCase\getLang().
LanguageTest::testFormatTimePeriod | ( | $seconds, | |
$format, | |||
$expected, | |||
$desc | |||
) |
@dataProvider provideFormattableTimes# @covers Language::formatTimePeriod
Definition at line 22 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testGetNamespaceAliases | ( | $languageCode, | |
$subset | |||
) |
@dataProvider provideGetNamespaceAliases @covers Language::getNamespaceAliases
Definition at line 1569 of file LanguageTest.php.
References as, and Language\factory().
LanguageTest::testGetParentLanguage | ( | $code, | |
$expected, | |||
$comment | |||
) |
@dataProvider provideGetParentLanguage @covers Language::getParentLanguage
Definition at line 1546 of file LanguageTest.php.
References $comment, and Language\factory().
LanguageTest::testIsSupportedLanguage | ( | $code, | |
$expected, | |||
$comment | |||
) |
@dataProvider provideIsSupportedLanguage @covers Language::isSupportedLanguage
Definition at line 1529 of file LanguageTest.php.
References $comment, and Language\isSupportedLanguage().
LanguageTest::testKnownCldrLanguageTag | ( | ) |
@covers Language::isKnownLanguageTag
Definition at line 509 of file LanguageTest.php.
References Language\isKnownLanguageTag().
LanguageTest::testKnownLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Test Language::isKnownLanguageTag() @dataProvider provideKnownLanguageTags @covers Language::isKnownLanguageTag.
Definition at line 491 of file LanguageTest.php.
References Language\isKnownLanguageTag().
LanguageTest::testLanguageConvertDoubleWidthToSingleWidth | ( | ) |
@covers Language::convertDoubleWidth @covers Language::normalizeForSearch
Definition at line 8 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testLenientLanguageTag | ( | ) |
Negative test for Language::isWellFormedLanguageTag() @covers Language::isWellFormedLanguageTag.
Definition at line 445 of file LanguageTest.php.
References Language\isWellFormedLanguageTag().
LanguageTest::testListToText | ( | ) |
@covers Language::listToText
Definition at line 1512 of file LanguageTest.php.
References $s, array(), and LanguageClassesTestCase\getLang().
LanguageTest::testMalformedLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Negative test for Language::isWellFormedLanguageTag() @dataProvider provideMalformedLanguageTags @covers Language::isWellFormedLanguageTag.
Definition at line 394 of file LanguageTest.php.
References Language\isWellFormedLanguageTag().
LanguageTest::testRomanNumerals | ( | $num, | |
$numerals | |||
) |
@dataProvider provideRomanNumeralsData @covers Language::romanNumeral
Definition at line 1343 of file LanguageTest.php.
References Language\romanNumeral().
LanguageTest::testSprintfDate | ( | $format, | |
$ts, | |||
$expected, | |||
$msg | |||
) |
@dataProvider provideSprintfDateSamples @covers Language::sprintfDate
Definition at line 570 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateNotAllDigitTimestamp | ( | ) |
Test too short timestamp @expectedException MWException @covers Language::sprintfDate.
Definition at line 562 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateNoZone | ( | $format, | |
$ts, | |||
$expected, | |||
$ignore, | |||
$msg | |||
) |
sprintfDate should always use UTC when no zone is given.
@dataProvider provideSprintfDateSamples @covers Language::sprintfDate
Definition at line 583 of file LanguageTest.php.
References $res, and LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTooLongTimestamp | ( | ) |
Test too long timestamp @expectedException MWException @covers Language::sprintfDate.
Definition at line 553 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTooShortTimestamp | ( | ) |
Test too short timestamp @expectedException MWException @covers Language::sprintfDate.
Definition at line 544 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTZ | ( | $format, | |
$ts, | |||
$ignore, | |||
$expected, | |||
$msg | |||
) |
sprintfDate should use passed timezone @dataProvider provideSprintfDateSamples @covers Language::sprintfDate
Definition at line 604 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testTranslateBlockExpiry | ( | $expectedData, | |
$str, | |||
$desc | |||
) |
@covers Language::translateBlockExpiry() @dataProvider provideTranslateBlockExpiry
Definition at line 1447 of file LanguageTest.php.
References LanguageClassesTestCase\getLang(), and list.
LanguageTest::testTruncate | ( | ) |
@covers Language::truncate
Definition at line 214 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testTruncateHtml | ( | $len, | |
$ellipsis, | |||
$input, | |||
$expected | |||
) |
@dataProvider provideHTMLTruncateData @covers Language::truncateHTML
Definition at line 270 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testUnknownLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Negative tests for Language::isKnownLanguageTag() @dataProvider provideUnKnownLanguageTags @covers Language::isKnownLanguageTag.
Definition at line 525 of file LanguageTest.php.
References Language\isKnownLanguageTag().
LanguageTest::testWellFormedLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Test Language::isWellFormedLanguageTag() @dataProvider provideWellFormedLanguageTags @covers Language::isWellFormedLanguageTag.
Definition at line 342 of file LanguageTest.php.
References Language\isWellFormedLanguageTag().