MediaWiki
1.23.5
|
@group ContentHandler @group Database More...
Public Member Functions | |
testGetContentText_NonTextContent_fail () | |
ContentHandler::getContentText should have thrown an exception for non-text Content object @expectedException MWException @covers ContentHandler::getContentText. More... | |
testGetContentText_NonTextContent_ignore () | |
@covers ContentHandler::getContentText More... | |
testGetContentText_NonTextContent_serialize () | |
@covers ContentHandler::getContentText More... | |
testGetContentText_Null ( $contentHandlerTextFallback) | |
@dataProvider dataGetContentText_Null @covers ContentHandler::getContentText More... | |
testGetContentText_TextContent ( $contentHandlerTextFallback) | |
@dataProvider dataGetContentText_TextContent @covers ContentHandler::getContentText More... | |
testGetDefaultModelFor ( $title, $expectedModelId) | |
@dataProvider dataGetDefaultModelFor @covers ContentHandler::getDefaultModelFor More... | |
testGetForTitle ( $title, $expectedContentModel) | |
@dataProvider dataGetDefaultModelFor @covers ContentHandler::getForTitle More... | |
testGetLocalizedName ( $id, $expected) | |
@dataProvider dataGetLocalizedName @covers ContentHandler::getLocalizedName More... | |
testGetPageLanguage ( $title, $expected) | |
@dataProvider dataGetPageLanguage @covers ContentHandler::getPageLanguage More... | |
testMakeContent ( $data, $title, $modelId, $format, $expectedModelId, $expectedNativeData, $shouldFail) | |
@dataProvider dataMakeContent @covers ContentHandler::makeContent More... | |
testRunLegacyHooks () | |
@covers ContentHandler::runLegacyHooks 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 | dataGetContentText_Null () |
static | dataGetContentText_TextContent () |
static | dataGetDefaultModelFor () |
static | dataGetLocalizedName () |
static | dataGetPageLanguage () |
static | dataMakeContent () |
static | dummyHookHandler ( $foo, &$text, $bar) |
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... | |
Protected Member Functions | |
setUp () | |
tearDown () | |
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... | |
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 |
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() |
@group ContentHandler @group Database
Definition at line 11 of file ContentHandlerTest.php.
|
static |
Definition at line 152 of file ContentHandlerTest.php.
References array().
|
static |
Definition at line 173 of file ContentHandlerTest.php.
References array().
|
static |
Definition at line 51 of file ContentHandlerTest.php.
References array(), CONTENT_MODEL_CSS, CONTENT_MODEL_JAVASCRIPT, and CONTENT_MODEL_WIKITEXT.
|
static |
Definition at line 90 of file ContentHandlerTest.php.
References array(), and CONTENT_MODEL_JAVASCRIPT.
|
static |
Definition at line 119 of file ContentHandlerTest.php.
References array(), CONTENT_MODEL_JAVASCRIPT, and global.
|
static |
Definition at line 235 of file ContentHandlerTest.php.
References array(), CONTENT_FORMAT_JAVASCRIPT, CONTENT_FORMAT_WIKITEXT, CONTENT_MODEL_CSS, CONTENT_MODEL_JAVASCRIPT, and CONTENT_MODEL_WIKITEXT.
|
static |
Definition at line 300 of file ContentHandlerTest.php.
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 13 of file ContentHandlerTest.php.
References $wgContLang, array(), CONTENT_MODEL_CSS, CONTENT_MODEL_JAVASCRIPT, CONTENT_MODEL_TEXT, CONTENT_MODEL_WIKITEXT, MWNamespace\getCanonicalNamespaces(), global, and MediaWikiTestCase\setMwGlobals().
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 41 of file ContentHandlerTest.php.
References $wgContLang, MWNamespace\getCanonicalNamespaces(), and global.
ContentHandlerTest::testGetContentText_NonTextContent_fail | ( | ) |
ContentHandler::getContentText should have thrown an exception for non-text Content object @expectedException MWException @covers ContentHandler::getContentText.
Definition at line 199 of file ContentHandlerTest.php.
References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().
ContentHandlerTest::testGetContentText_NonTextContent_ignore | ( | ) |
@covers ContentHandler::getContentText
Definition at line 222 of file ContentHandlerTest.php.
References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().
ContentHandlerTest::testGetContentText_NonTextContent_serialize | ( | ) |
@covers ContentHandler::getContentText
Definition at line 210 of file ContentHandlerTest.php.
References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().
ContentHandlerTest::testGetContentText_Null | ( | $contentHandlerTextFallback | ) |
@dataProvider dataGetContentText_Null @covers ContentHandler::getContentText
Definition at line 164 of file ContentHandlerTest.php.
References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().
ContentHandlerTest::testGetContentText_TextContent | ( | $contentHandlerTextFallback | ) |
@dataProvider dataGetContentText_TextContent @covers ContentHandler::getContentText
Definition at line 185 of file ContentHandlerTest.php.
References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().
ContentHandlerTest::testGetDefaultModelFor | ( | $title, | |
$expectedModelId | |||
) |
@dataProvider dataGetDefaultModelFor @covers ContentHandler::getDefaultModelFor
Definition at line 75 of file ContentHandlerTest.php.
References $title, ContentHandler\getDefaultModelFor(), and Title\newFromText().
ContentHandlerTest::testGetForTitle | ( | $title, | |
$expectedContentModel | |||
) |
@dataProvider dataGetDefaultModelFor @covers ContentHandler::getForTitle
Definition at line 84 of file ContentHandlerTest.php.
References $title, ContentHandler\getForTitle(), and Title\newFromText().
ContentHandlerTest::testGetLocalizedName | ( | $id, | |
$expected | |||
) |
@dataProvider dataGetLocalizedName @covers ContentHandler::getLocalizedName
Definition at line 104 of file ContentHandlerTest.php.
References $name, and ContentHandler\getLocalizedName().
ContentHandlerTest::testGetPageLanguage | ( | $title, | |
$expected | |||
) |
@dataProvider dataGetPageLanguage @covers ContentHandler::getPageLanguage
Definition at line 139 of file ContentHandlerTest.php.
References $title, ContentHandler\getForTitle(), Title\newFromText(), and wfGetLangObj().
ContentHandlerTest::testMakeContent | ( | $data, | |
$title, | |||
$modelId, | |||
$format, | |||
$expectedModelId, | |||
$expectedNativeData, | |||
$shouldFail | |||
) |
@dataProvider dataMakeContent @covers ContentHandler::makeContent
Definition at line 259 of file ContentHandlerTest.php.
References $title, fail, ContentHandler\makeContent(), and Title\newFromText().
ContentHandlerTest::testRunLegacyHooks | ( | ) |
@covers ContentHandler::runLegacyHooks
Definition at line 290 of file ContentHandlerTest.php.
References $ok, array(), Hooks\register(), and ContentHandler\runLegacyHooks().