MediaWiki
1.23.2
|
@group ContentHandler @group Database ^— important, causes temporary tables to be used instead of the real database @group medium More...
Static Public Member Functions | |
static | provideGetAutoDeleteReason () |
static | provideGetAutosummary () |
static | provideGetParserOutput () |
static | provideGetRedirectTarget () |
static | provideHasViewableContent () |
static | provideIsCountable () |
static | providePreSaveTransform () |
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... | |
Static Public Attributes | |
static | $sections |
Static Public Attributes inherited from MediaWikiTestCase | |
static | $users |
Protected Member Functions | |
createPage ( $page, $text, $model=null) | |
newPage ( $title, $model=null) | |
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... | |
Protected Attributes | |
$pages_to_delete | |
Protected Attributes inherited from MediaWikiTestCase | |
DatabaseBase | $db |
array | $supportedDBs |
array | $tablesUsed = array() |
Additional Inherited Members | |
Public Attributes inherited from MediaWikiTestCase | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. More... | |
const | ORA_DB_PREFIX = 'ut_' |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. More... | |
@group ContentHandler @group Database ^— important, causes temporary tables to be used instead of the real database @group medium
Definition at line 9 of file WikiPageTest.php.
Reimplemented from MediaWikiTestCase.
Definition at line 13 of file WikiPageTest.php.
WikiPageTest::broken_testDoRollback | ( | ) |
Definition at line 798 of file WikiPageTest.php.
|
protected |
Definition at line 82 of file WikiPageTest.php.
References EDIT_NEW, ContentHandler\makeContent(), and newPage().
Referenced by testDoDeleteArticle(), testDoDeleteUpdates(), testDoQuickEdit(), testDoQuickEditContent(), testExists(), testGetContent(), WikiPageTest_ContentHandlerUseDB\testGetContentHandler(), testGetContentHandler(), WikiPageTest_ContentHandlerUseDB\testGetContentModel(), testGetContentModel(), testGetParserOutput(), testGetRawText(), testGetRedirectTarget(), testGetRevision(), testGetText(), testHasViewableContent(), testIsCountable(), and testIsRedirect().
WikiPageTest::dataReplaceSection | ( | ) |
Definition at line 678 of file WikiPageTest.php.
|
protected |
Title | $title | |
String | $model |
Definition at line 62 of file WikiPageTest.php.
References $title, MediaWikiTestCase\getDefaultWikitextNS(), and Title\newFromText().
Referenced by createPage(), testDoEdit(), testDoEditContent(), testExists(), testGetContent(), testGetRawText(), testGetRevision(), testGetText(), and testHasViewableContent().
|
static |
Definition at line 986 of file WikiPageTest.php.
|
static |
Definition at line 930 of file WikiPageTest.php.
|
static |
Definition at line 609 of file WikiPageTest.php.
References array(), and CONTENT_MODEL_WIKITEXT.
|
static |
Definition at line 440 of file WikiPageTest.php.
References array(), and CONTENT_MODEL_WIKITEXT.
|
static |
Definition at line 413 of file WikiPageTest.php.
References array().
|
static |
Definition at line 472 of file WikiPageTest.php.
References array(), and CONTENT_MODEL_WIKITEXT.
|
static |
Definition at line 1087 of file WikiPageTest.php.
|
protected |
Reimplemented from MediaWikiLangTestCase.
Reimplemented in WikiPageTest_ContentHandlerUseDB.
Definition at line 35 of file WikiPageTest.php.
References array(), etc, redirect, and LinkCache\singleton().
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 42 of file WikiPageTest.php.
References as.
WikiPageTest::testDoDeleteArticle | ( | ) |
@covers WikiPage::doDeleteArticle
Definition at line 247 of file WikiPageTest.php.
References $dbr, $n, $res, $t, array(), CONTENT_MODEL_WIKITEXT, createPage(), DB_SLAVE, Title\newFromText(), and wfGetDB().
WikiPageTest::testDoDeleteUpdates | ( | ) |
@covers WikiPage::doDeleteUpdates
Definition at line 274 of file WikiPageTest.php.
References $dbr, $n, $res, array(), CONTENT_MODEL_WIKITEXT, createPage(), DB_SLAVE, and wfGetDB().
WikiPageTest::testDoEdit | ( | ) |
@covers WikiPage::doEdit
Definition at line 152 of file WikiPageTest.php.
References $dbr, $n, $res, $title, array(), DB_SLAVE, MediaWikiTestCase\hideDeprecated(), Title\newFromText(), newPage(), and wfGetDB().
WikiPageTest::testDoEditContent | ( | ) |
@covers WikiPage::doEditContent
Definition at line 96 of file WikiPageTest.php.
References $dbr, $n, $res, $title, array(), CONTENT_MODEL_WIKITEXT, DB_SLAVE, ContentHandler\makeContent(), newPage(), and wfGetDB().
WikiPageTest::testDoQuickEdit | ( | ) |
@covers WikiPage::doQuickEdit
Definition at line 212 of file WikiPageTest.php.
References $wgUser, createPage(), global, and MediaWikiTestCase\hideDeprecated().
WikiPageTest::testDoQuickEditContent | ( | ) |
@covers WikiPage::doQuickEditContent
Definition at line 231 of file WikiPageTest.php.
References $wgUser, CONTENT_MODEL_WIKITEXT, createPage(), global, and ContentHandler\makeContent().
WikiPageTest::testDoRollback | ( | ) |
@covers WikiPage::doRollback
Definition at line 855 of file WikiPageTest.php.
WikiPageTest::testDoRollbackFailureSameContent | ( | ) |
@covers WikiPage::doRollback
Definition at line 890 of file WikiPageTest.php.
WikiPageTest::testExists | ( | ) |
@covers WikiPage::exists
Definition at line 394 of file WikiPageTest.php.
References CONTENT_MODEL_WIKITEXT, createPage(), WikiPage\doDeleteArticle(), and newPage().
WikiPageTest::testGetAutoDeleteReason | ( | $edits, | |
$expectedResult, | |||
$expectedHistory | |||
) |
@dataProvider provideGetAutoDeleteReason @covers WikiPage::getAutoDeleteReason
Definition at line 1048 of file WikiPageTest.php.
WikiPageTest::testGetAutosummary | ( | $old, | |
$new, | |||
$flags, | |||
$expected | |||
) |
@dataProvider provideGetAutoSummary @covers WikiPage::getAutosummary
Definition at line 975 of file WikiPageTest.php.
WikiPageTest::testGetContent | ( | ) |
@covers WikiPage::getContent
Definition at line 310 of file WikiPageTest.php.
References CONTENT_MODEL_WIKITEXT, createPage(), and newPage().
WikiPageTest::testGetContentHandler | ( | ) |
@covers WikiPage::getContentHandler
Reimplemented in WikiPageTest_ContentHandlerUseDB.
Definition at line 378 of file WikiPageTest.php.
References CONTENT_MODEL_JAVASCRIPT, createPage(), and global.
WikiPageTest::testGetContentModel | ( | ) |
@covers WikiPage::getContentModel
Reimplemented in WikiPageTest_ContentHandlerUseDB.
Definition at line 362 of file WikiPageTest.php.
References CONTENT_MODEL_JAVASCRIPT, createPage(), and global.
WikiPageTest::testGetParserOutput | ( | $model, | |
$text, | |||
$expectedHtml | |||
) |
@dataProvider provideGetParserOutput @covers WikiPage::getParserOutput
Definition at line 620 of file WikiPageTest.php.
References createPage().
WikiPageTest::testGetParserOutput_badrev | ( | ) |
@covers WikiPage::getParserOutput
Definition at line 653 of file WikiPageTest.php.
WikiPageTest::testGetParserOutput_nonexisting | ( | ) |
@covers WikiPage::getParserOutput
Definition at line 638 of file WikiPageTest.php.
WikiPageTest::testGetRawText | ( | ) |
@covers WikiPage::getRawText
Definition at line 344 of file WikiPageTest.php.
References CONTENT_MODEL_WIKITEXT, createPage(), MediaWikiTestCase\hideDeprecated(), and newPage().
WikiPageTest::testGetRedirectTarget | ( | $title, | |
$model, | |||
$text, | |||
$target | |||
) |
@dataProvider provideGetRedirectTarget @covers WikiPage::getRedirectTarget
Definition at line 451 of file WikiPageTest.php.
References $t, $title, and createPage().
WikiPageTest::testGetRevision | ( | ) |
@covers WikiPage::getRevision
Definition at line 292 of file WikiPageTest.php.
References $rev, CONTENT_MODEL_WIKITEXT, createPage(), and newPage().
WikiPageTest::testGetText | ( | ) |
@covers WikiPage::getText
Definition at line 326 of file WikiPageTest.php.
References CONTENT_MODEL_WIKITEXT, createPage(), MediaWikiTestCase\hideDeprecated(), and newPage().
WikiPageTest::testHasViewableContent | ( | $title, | |
$viewable, | |||
$create = false |
|||
) |
@dataProvider provideHasViewableContent @covers WikiPage::hasViewableContent
Definition at line 427 of file WikiPageTest.php.
References $title, CONTENT_MODEL_WIKITEXT, createPage(), and newPage().
WikiPageTest::testIsCountable | ( | $title, | |
$model, | |||
$text, | |||
$mode, | |||
$expected | |||
) |
@dataProvider provideIsCountable @covers WikiPage::isCountable
Definition at line 583 of file WikiPageTest.php.
References $title, createPage(), ContentHandler\getDefaultModelFor(), global, Title\newFromText(), and MediaWikiTestCase\setMwGlobals().
WikiPageTest::testIsRedirect | ( | $title, | |
$model, | |||
$text, | |||
$target | |||
) |
@dataProvider provideGetRedirectTarget @covers WikiPage::isRedirect
Definition at line 467 of file WikiPageTest.php.
References $title, and createPage().
WikiPageTest::testPreSaveTransform | ( | $text, | |
$expected | |||
) |
@dataProvider providePreSaveTransform @covers WikiPage::preSaveTransform
Definition at line 1102 of file WikiPageTest.php.
WikiPageTest::testReplaceSection | ( | $title, | |
$model, | |||
$text, | |||
$section, | |||
$with, | |||
$sectionTitle, | |||
$expected | |||
) |
@dataProvider dataReplaceSection @covers WikiPage::replaceSection
Definition at line 730 of file WikiPageTest.php.
WikiPageTest::testReplaceSectionContent | ( | $title, | |
$model, | |||
$text, | |||
$section, | |||
$with, | |||
$sectionTitle, | |||
$expected | |||
) |
@dataProvider dataReplaceSection @covers WikiPage::replaceSectionContent
Definition at line 744 of file WikiPageTest.php.
WikiPageTest::testWikiPageFactory | ( | ) |
@covers WikiPage::factory
Definition at line 1117 of file WikiPageTest.php.
|
protected |
Definition at line 11 of file WikiPageTest.php.
|
static |
Definition at line 664 of file WikiPageTest.php.