MediaWiki REL1_28
|
Public Member Functions | |
parseFormattedNumberProvider () | |
testBuiltInCodeValidation ( $code, $expected, $message='') | |
Test Language::isValidBuiltInCode() provideLanguageCodes Language::isValidBuiltInCode. | |
testCheckTitleEncoding ( $s) | |
provideCheckTitleEncodingData Language::checkTitleEncoding | |
testCommafy ( $number, $numbersWithCommas) | |
Language::commafy() provideCommafyData. | |
testConvertPlural ( $expected, $number, $forms) | |
providePluralData Language::convertPlural | |
testEmbedBidi () | |
Language::embedBidi() | |
testEquals () | |
testFormatBitrate ( $bps, $expected, $msg) | |
provideFormatBitrate Language::formatBitrate | |
testFormatDuration ( $duration, $expected, $intervals=[]) | |
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 | |
testHebrewNumeral ( $num, $numerals) | |
provideHebrewNumeralsData Language::hebrewNumeral | |
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. | |
testParseFormattedNumber ( $langCode, $number) | |
parseFormattedNumberProvider | |
testRomanNumerals ( $num, $numerals) | |
provideRomanNumeralsData Language::romanNumeral | |
testSprintfDate ( $format, $ts, $expected, $msg) | |
provideSprintfDateSamples Language::sprintfDate | |
testSprintfDateNotAllDigitTimestamp () | |
Test too short timestamp MWException Language::sprintfDate. | |
testSprintfDateNoTtlIfNotNeeded () | |
sprintfDate should only calculate a TTL if the caller is going to use it. | |
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. | |
Public Member Functions inherited from MediaWikiTestCase | |
__call ( $func, $args) | |
__construct ( $name=null, array $data=[], $dataName='') | |
__destruct () | |
addDBData () | |
Stub. | |
addDBDataOnce () | |
Stub. | |
dbPrefix () | |
getCliArg ( $offset) | |
hideDeprecated ( $function) | |
Don't throw a warning if $function is deprecated and called later. | |
needsDB () | |
run (PHPUnit_Framework_TestResult $result=null) | |
setCliArg ( $offset, $value) | |
setContentLang ( $lang) | |
setupAllTestDBs () | |
Set up all test DBs. | |
setUserLang ( $lang) | |
testMediaWikiTestCaseParentSetupCalled () | |
Make sure MediaWikiTestCase extending classes have called their parent setUp method. | |
usesTemporaryTables () | |
Static Public Member Functions | |
static | provideCheckTitleEncodingData () |
static | provideCommafyData () |
static | provideFormatBitrate () |
static | provideFormatDuration () |
static | provideFormatSizes () |
static | provideFormattableTimes () |
static | provideGetNamespaceAliases () |
static | provideGetParentLanguage () |
static | provideHebrewNumeralsData () |
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.nosp@m.meye.nosp@m.r@nic.nosp@m..fr 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 bortz.nosp@m.meye.nosp@m.r@nic.nosp@m..fr and distributed as free software, under the GNU General Public Licence. | |
Static Public Member Functions inherited from MediaWikiTestCase | |
static | assertNotTag ( $matcher, $actual, $message='', $isHtml=true) |
static | assertTag ( $matcher, $actual, $message='', $isHtml=true) |
Note: we are overriding this method to remove the deprecated error. | |
static | getMutableTestUser ( $groups=[]) |
Convenience method for getting a mutable test user. | |
static | getTestSysop () |
Convenience method for getting an immutable admin test user. | |
static | getTestUser ( $groups=[]) |
Convenience method for getting an immutable test user. | |
static | listTables (Database $db) |
static | prepareServices (Config $bootstrapConfig) |
Prepare service configuration for unit testing. | |
static | setUpBeforeClass () |
static | setupTestDB (Database $db, $prefix) |
Creates an empty skeleton of the wiki database by cloning its structure to equivalent tables using the given $prefix. | |
static | teardownTestDB () |
Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. | |
static | wfResetOutputBuffersBarrier ( $buffer) |
Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit. | |
Additional Inherited Members | |
Public Attributes inherited from MediaWikiTestCase | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. | |
const | ORA_DB_PREFIX = 'ut_' |
Static Public Attributes inherited from MediaWikiTestCase | |
static TestUser[] | $users |
Protected Member Functions inherited from LanguageClassesTestCase | |
getLang () | |
setUp () | |
Create a new language object before each test. | |
tearDown () | |
Delete the internal language object so each test start out with a fresh language instance. | |
Protected Member Functions inherited from MediaWikiTestCase | |
addTmpFiles ( $files) | |
arrayWrap (array $elements) | |
Utility method taking an array of elements and wrapping each element in its own array. | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. | |
assertHTMLEquals ( $expected, $actual, $msg='') | |
Put each HTML element on its own line and then equals() the results. | |
assertSelect ( $table, $fields, $condition, array $expectedRows) | |
Asserts that the given database query yields the rows given by $expectedRows. | |
assertType ( $type, $actual, $message='') | |
Asserts the type of the provided value. | |
assertTypeOrValue ( $type, $actual, $value=false, $message='') | |
Asserts that the provided variable is of the specified internal type or equals the $value argument. | |
assertValidHtmlDocument ( $html) | |
Asserts that the given string is valid HTML document. | |
assertValidHtmlSnippet ( $html) | |
Asserts that the given string is a valid HTML snippet. | |
checkDbIsSupported () | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. | |
getNewTempDirectory () | |
obtains a new temporary directory | |
getNewTempFile () | |
Obtains a new temporary file name. | |
insertPage ( $pageName, $text='Sample page for unit test.', $namespace=null) | |
Insert a new page. | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. | |
markTestSkippedIfNoDiff3 () | |
Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. | |
mergeMwGlobalArrayValue ( $name, $values) | |
Merges the given values into a MW global array variable. | |
objectAssociativeSort (array &$array) | |
Does an associative sort that works for objects. | |
overrideMwServices (Config $configOverrides=null, array $services=[]) | |
Stashes the global instance of MediaWikiServices, and installs a new one, allowing test cases to override settings and services. | |
setLogger ( $channel, LoggerInterface $logger) | |
Sets the logger for a specified channel, for the duration of the test. | |
setMwGlobals ( $pairs, $value=null) | |
setService ( $name, $object) | |
Sets a service, maintaining a stashed version of the previous service to be restored in tearDown. | |
setTemporaryHook ( $hookName, $handler) | |
Create a temporary hook handler which will be reset by tearDown. | |
stashMwGlobals ( $globalKeys) | |
Stashes the global, will be restored in tearDown() | |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | getExternalStoreDatabaseConnections () |
Gets master database connections for all of the ExternalStoreDB stores configured in $wgDefaultExternalStore. | |
static | isUsingExternalStoreDB () |
Check whether ExternalStoreDB is being used. | |
static | resetGlobalServices (Config $bootstrapConfig=null) |
Reset global services, and install testing environment. | |
static | setupDatabaseWithTestPrefix (Database $db, $prefix) |
Setups a database with the given prefix. | |
static | setupExternalStoreTestDBs ( $testPrefix) |
Clones the External Store database(s) for testing. | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. | |
Protected Attributes inherited from MediaWikiTestCase | |
Database | $db |
Primary database. | |
array | $supportedDBs |
array | $tablesUsed = [] |
Definition at line 3 of file LanguageTest.php.
LanguageTest::parseFormattedNumberProvider | ( | ) |
Definition at line 1632 of file LanguageTest.php.
|
static |
Definition at line 1329 of file LanguageTest.php.
|
static |
Definition at line 1655 of file LanguageTest.php.
|
static |
Definition at line 1120 of file LanguageTest.php.
|
static |
Definition at line 1192 of file LanguageTest.php.
|
static |
Definition at line 1057 of file LanguageTest.php.
|
static |
Definition at line 26 of file LanguageTest.php.
References true.
|
static |
Definition at line 1747 of file LanguageTest.php.
References NS_FILE.
|
static |
Definition at line 1723 of file LanguageTest.php.
|
static |
Definition at line 1455 of file LanguageTest.php.
|
static |
Definition at line 291 of file LanguageTest.php.
|
static |
Definition at line 1701 of file LanguageTest.php.
|
static |
Definition at line 501 of file LanguageTest.php.
|
static |
Definition at line 477 of file LanguageTest.php.
|
static |
The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer bortz.nosp@m.meye.nosp@m.r@nic.nosp@m..fr and distributed as free software, under the GNU General Public Licence.
http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
Definition at line 417 of file LanguageTest.php.
|
static |
Definition at line 1523 of file LanguageTest.php.
|
static |
Definition at line 1396 of file LanguageTest.php.
|
static |
Definition at line 659 of file LanguageTest.php.
|
static |
Definition at line 1599 of file LanguageTest.php.
|
static |
Definition at line 537 of file LanguageTest.php.
|
static |
The test cases are based on the tests in the GaBuZoMeu parser written by Stéphane Bortzmeyer bortz.nosp@m.meye.nosp@m.r@nic.nosp@m..fr and distributed as free software, under the GNU General Public Licence.
http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
Definition at line 365 of file LanguageTest.php.
LanguageTest::testBuiltInCodeValidation | ( | $code, | |
$expected, | |||
$message = '' |
|||
) |
Test Language::isValidBuiltInCode() provideLanguageCodes Language::isValidBuiltInCode.
Definition at line 470 of file LanguageTest.php.
References $code.
LanguageTest::testCheckTitleEncoding | ( | $s | ) |
provideCheckTitleEncodingData Language::checkTitleEncoding
Definition at line 1321 of file LanguageTest.php.
References $s, and LanguageClassesTestCase\getLang().
LanguageTest::testCommafy | ( | $number, | |
$numbersWithCommas | |||
) |
Language::commafy() provideCommafyData.
Definition at line 1647 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testConvertPlural | ( | $expected, | |
$number, | |||
$forms | |||
) |
providePluralData Language::convertPlural
Definition at line 1518 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testEmbedBidi | ( | ) |
Language::embedBidi()
Definition at line 1562 of file LanguageTest.php.
References $lang, and LanguageClassesTestCase\getLang().
LanguageTest::testEquals | ( | ) |
Definition at line 1760 of file LanguageTest.php.
LanguageTest::testFormatBitrate | ( | $bps, | |
$expected, | |||
$msg | |||
) |
provideFormatBitrate Language::formatBitrate
Definition at line 1112 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testFormatDuration | ( | $duration, | |
$expected, | |||
$intervals = [] |
|||
) |
provideFormatDuration Language::formatDuration
Definition at line 1184 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testFormatSize | ( | $size, | |
$expected, | |||
$msg | |||
) |
provideFormatSizes Language::formatSize
Definition at line 1049 of file LanguageTest.php.
References 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 1739 of file LanguageTest.php.
References as.
LanguageTest::testGetParentLanguage | ( | $code, | |
$expected, | |||
$comment | |||
) |
provideGetParentLanguage Language::getParentLanguage
Definition at line 1714 of file LanguageTest.php.
LanguageTest::testHebrewNumeral | ( | $num, | |
$numerals | |||
) |
provideHebrewNumeralsData Language::hebrewNumeral
Definition at line 1447 of file LanguageTest.php.
LanguageTest::testIsSupportedLanguage | ( | $code, | |
$expected, | |||
$comment | |||
) |
provideIsSupportedLanguage Language::isSupportedLanguage
Definition at line 1697 of file LanguageTest.php.
LanguageTest::testKnownCldrLanguageTag | ( | ) |
Language::isKnownLanguageTag.
Definition at line 512 of file LanguageTest.php.
LanguageTest::testKnownLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Test Language::isKnownLanguageTag() provideKnownLanguageTags Language::isKnownLanguageTag.
Definition at line 494 of file LanguageTest.php.
References $code.
LanguageTest::testLanguageConvertDoubleWidthToSingleWidth | ( | ) |
Language::convertDoubleWidth Language::normalizeForSearch.
Definition at line 8 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testLenientLanguageTag | ( | ) |
Negative test for Language::isWellFormedLanguageTag() Language::isWellFormedLanguageTag.
Definition at line 458 of file LanguageTest.php.
LanguageTest::testListToText | ( | ) |
Language::listToText.
Definition at line 1680 of file LanguageTest.php.
References $lang, $s, and LanguageClassesTestCase\getLang().
LanguageTest::testMalformedLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Negative test for Language::isWellFormedLanguageTag() provideMalformedLanguageTags Language::isWellFormedLanguageTag.
Definition at line 404 of file LanguageTest.php.
References $code.
LanguageTest::testParseFormattedNumber | ( | $langCode, | |
$number | |||
) |
LanguageTest::testRomanNumerals | ( | $num, | |
$numerals | |||
) |
provideRomanNumeralsData Language::romanNumeral
Definition at line 1388 of file LanguageTest.php.
LanguageTest::testSprintfDate | ( | $format, | |
$ts, | |||
$expected, | |||
$msg | |||
) |
provideSprintfDateSamples Language::sprintfDate
Definition at line 575 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateNotAllDigitTimestamp | ( | ) |
Test too short timestamp MWException Language::sprintfDate.
Definition at line 567 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateNoTtlIfNotNeeded | ( | ) |
sprintfDate should only calculate a TTL if the caller is going to use it.
Language::sprintfDate
Definition at line 645 of file LanguageTest.php.
References LanguageClassesTestCase\getLang(), and wfTimestampNow().
LanguageTest::testSprintfDateNoZone | ( | $format, | |
$ts, | |||
$expected, | |||
$ignore, | |||
$msg | |||
) |
sprintfDate should always use UTC when no zone is given.
provideSprintfDateSamples Language::sprintfDate
Definition at line 607 of file LanguageTest.php.
References $res, and LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTooLongTimestamp | ( | ) |
Test too long timestamp MWException Language::sprintfDate.
Definition at line 558 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTooShortTimestamp | ( | ) |
Test too short timestamp MWException Language::sprintfDate.
Definition at line 549 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testSprintfDateTZ | ( | $format, | |
$ts, | |||
$ignore, | |||
$expected, | |||
$msg | |||
) |
sprintfDate should use passed timezone provideSprintfDateSamples Language::sprintfDate
Definition at line 628 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testTranslateBlockExpiry | ( | $expectedData, | |
$str, | |||
$desc | |||
) |
Language::translateBlockExpiry() provideTranslateBlockExpiry.
Definition at line 1588 of file LanguageTest.php.
References $lang, LanguageClassesTestCase\getLang(), and list.
LanguageTest::testTruncate | ( | ) |
Language::truncate.
Definition at line 214 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testTruncateHtml | ( | $len, | |
$ellipsis, | |||
$input, | |||
$expected | |||
) |
provideHTMLTruncateData Language::truncateHTML
Definition at line 280 of file LanguageTest.php.
References LanguageClassesTestCase\getLang().
LanguageTest::testUnknownLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Negative tests for Language::isKnownLanguageTag() provideUnKnownLanguageTags Language::isKnownLanguageTag.
Definition at line 530 of file LanguageTest.php.
References $code.
LanguageTest::testWellFormedLanguageTag | ( | $code, | |
$message = '' |
|||
) |
Test Language::isWellFormedLanguageTag() provideWellFormedLanguageTags Language::isWellFormedLanguageTag.
Definition at line 352 of file LanguageTest.php.
References $code.