MediaWiki
1.32.5
|
RevisionDbTestBase contains test cases for the Revision class that have Database interactions. More...
Static Public Member Functions | |
static | provideUserWasLastToEdit () |
Static Public Member Functions inherited from MediaWikiTestCase | |
static | getMutableTestUser ( $groups=[]) |
Convenience method for getting a mutable test user. More... | |
static | getTestPrefixFor (IDatabase $db) |
static | getTestSysop () |
Convenience method for getting an immutable admin test user. More... | |
static | getTestUser ( $groups=[]) |
Convenience method for getting an immutable test user. More... | |
static | installMockMwServices (Config $configOverrides=null) |
Creates a new "mock" MediaWikiServices instance, and installs it. More... | |
static | listTables (IMaintainableDatabase $db) |
static | prepareServices (Config $bootstrapConfig) |
static | resetNonServiceCaches () |
Resets some non-service singleton instances and other static caches. More... | |
static | restoreMwServices () |
Restores the original, non-mock MediaWikiServices instance. More... | |
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. More... | |
static | teardownTestDB () |
Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. More... | |
static | wfResetOutputBuffersBarrier ( $buffer) |
Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit. More... | |
Protected Member Functions | |
addCoreDBData () | |
getContentHandlerUseDB () | |
getMcrMigrationStage () | |
getMcrTablesToReset () | |
getMockTitle () | |
setUp () | |
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. More... | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. More... | |
assertFileContains ( $fileName, $actualData, $createIfMissing=false, $msg='') | |
Check whether file contains given data. 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, array $options=[], array $join_conds=[]) | |
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... | |
checkDbIsSupported () | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. More... | |
editPage ( $pageName, $text, $summary='', $defaultNs=NS_MAIN) | |
Edits or creates a page/revision. More... | |
ensureMockDatabaseConnection (IDatabase $db) | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. More... | |
getExistingTestPage ( $title=null) | |
Returns a WikiPage representing an existing page. More... | |
getNewTempDirectory () | |
obtains a new temporary directory More... | |
getNewTempFile () | |
Obtains a new temporary file name. More... | |
getNonexistingTestPage ( $title=null) | |
Returns a WikiPage representing a non-existing page. More... | |
getSchemaOverrides (IMaintainableDatabase $db) | |
Stub. More... | |
insertPage ( $pageName, $text='Sample page for unit test.', $namespace=null, User $user=null) | |
Insert a new page. More... | |
isTestInDatabaseGroup () | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. More... | |
markTestSkippedIfDbType ( $type) | |
Skip the test if using the specified database type. More... | |
markTestSkippedIfNoDiff3 () | |
Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. 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... | |
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. More... | |
revisionDelete ( $rev, array $value=[Revision::DELETED_TEXT=> 1], $comment='') | |
Revision-deletes a revision. More... | |
setIniSetting ( $name, $value) | |
Set an ini setting for the duration of the test. More... | |
setLogger ( $channel, LoggerInterface $logger) | |
Sets the logger for a specified channel, for the duration of the test. More... | |
setMwGlobals ( $pairs, $value=null) | |
Sets a global, maintaining a stashed version of the previous global to be restored in tearDown. More... | |
setService ( $name, $object) | |
Sets a service, maintaining a stashed version of the previous service to be restored in tearDown. More... | |
setTemporaryHook ( $hookName, $handler) | |
Create a temporary hook handler which will be reset by tearDown. More... | |
stashMwGlobals ( $globalKeys) | |
Stashes the global, will be restored in tearDown() More... | |
tearDown () | |
truncateTable ( $tableName, IDatabase $db=null) | |
Empties the given table and resets any auto-increment counters. More... | |
Private Member Functions | |
assertRevEquals (Revision $orig, Revision $rev=null) | |
createPage ( $titleString, $text, $model=null) | |
makeRevisionWithProps ( $props=null) | |
newTestRevision ( $text, $title="Test", $model=CONTENT_MODEL_WIKITEXT, $format=null) | |
Private Attributes | |
$testPage | |
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 TestUser[] | $users |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | getExternalStoreDatabaseConnections () |
Gets master database connections for all of the ExternalStoreDB stores configured in $wgDefaultExternalStore. More... | |
static | isUsingExternalStoreDB () |
Check whether ExternalStoreDB is being used. More... | |
static | setupDatabaseWithTestPrefix (IMaintainableDatabase $db, $prefix=null) |
Setups a database with cloned tables using the given prefix. More... | |
static | setupExternalStoreTestDBs ( $testPrefix=null) |
Clones the External Store database(s) for testing. More... | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. More... | |
Protected Attributes inherited from MediaWikiTestCase | |
Database | $db |
Primary database. More... | |
array | $supportedDBs |
array | $tablesUsed = [] |
RevisionDbTestBase contains test cases for the Revision class that have Database interactions.
Database medium
Definition at line 15 of file RevisionDbTestBase.php.
RevisionDbTestBase::__construct | ( | $name = null , |
|
array | $data = [] , |
||
$dataName = '' |
|||
) |
Reimplemented from MediaWikiTestCase.
Definition at line 22 of file RevisionDbTestBase.php.
References $name.
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 48 of file RevisionDbTestBase.php.
Definition at line 202 of file RevisionDbTestBase.php.
References $rev, Revision\getContentFormat(), Revision\getContentModel(), Revision\getId(), Revision\getPage(), Revision\getSha1(), Revision\getTimestamp(), and Revision\getUser().
Referenced by testLoadFromId(), testLoadFromPageId(), testLoadFromPageIdWithLatestRevId(), testLoadFromPageIdWithNotLatestRevId(), testLoadFromTimestamp(), testLoadFromTitle(), testLoadFromTitleWithLatestRevId(), testLoadFromTitleWithNotLatestRevId(), testNewFromArchiveRow(), testNewFromId(), testNewFromPageId(), testNewFromPageIdWithLatestId(), testNewFromPageIdWithNotLatestId(), testNewFromRow(), testNewKnownCurrent(), and testNewKnownCurrent_withPageId().
|
private |
string | $titleString | |
string | $text | |
string | null | $model |
Definition at line 180 of file RevisionDbTestBase.php.
References $content, $title, CONTENT_MODEL_WIKITEXT, EDIT_NEW, MWNamespace\getCanonicalName(), MediaWikiTestCase\getDefaultWikitextNS(), ContentHandler\makeContent(), and Title\newFromText().
Referenced by setUp(), testNewFromArchiveRow(), and testNewFromArchiveRowOverrides().
|
abstractprotected |
Reimplemented in RevisionMcrDbTest, RevisionMcrReadNewDbTest, RevisionNoContentModelDbTest, RevisionPreMcrDbTest, and RevisionMcrWriteBothDbTest.
Referenced by setUp(), and testNewFromArchiveRow().
|
abstractprotected |
Referenced by setUp(), and testNewFromArchiveRow().
|
abstractprotected |
Referenced by setUp().
|
protected |
string | $model |
Definition at line 112 of file RevisionDbTestBase.php.
References any, class, and MediaWikiTestCase\getDefaultWikitextNS().
Referenced by RevisionMcrReadNewDbTest\provideGetTextId(), and RevisionMcrDbTest\provideGetTextId().
|
private |
Definition at line 134 of file RevisionDbTestBase.php.
References $rev, $user, CONTENT_MODEL_WIKITEXT, DB_MASTER, MediaWikiTestCase\getTestUser(), and wfGetDB().
Referenced by testGetPage(), testInsertOn(), and testNewFromRow().
|
private |
string | $text | |
string | $title | |
string | $model | |
string | $format |
Definition at line 836 of file RevisionDbTestBase.php.
References $content, $rev, $title, ContentHandler\makeContent(), and Title\newFromText().
Referenced by testGetContent(), testGetContentFormat(), testGetContentHandler(), testGetContentModel(), testGetContentUncloned(), testGetSha1(), and testGetSize().
RevisionDbTestBase::provideGetContent | ( | ) |
Definition at line 921 of file RevisionDbTestBase.php.
References Revision\FOR_PUBLIC, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetContentFormat | ( | ) |
Definition at line 882 of file RevisionDbTestBase.php.
References CONTENT_FORMAT_CSS, CONTENT_FORMAT_WIKITEXT, CONTENT_MODEL_CSS, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetContentHandler | ( | ) |
Definition at line 902 of file RevisionDbTestBase.php.
References class, and serialize().
RevisionDbTestBase::provideGetContentModel | ( | ) |
Definition at line 863 of file RevisionDbTestBase.php.
References CONTENT_MODEL_CSS, CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetSha1 | ( | ) |
Definition at line 998 of file RevisionDbTestBase.php.
References Revision\base36Sha1(), CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetSize | ( | ) |
Definition at line 982 of file RevisionDbTestBase.php.
References CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetTextId | ( | ) |
Reimplemented in RevisionMcrDbTest, RevisionMcrReadNewDbTest, RevisionNoContentModelDbTest, RevisionPreMcrDbTest, and RevisionMcrWriteBothDbTest.
Definition at line 1576 of file RevisionDbTestBase.php.
References CONTENT_MODEL_WIKITEXT, and Revision\MutableRevisionRecord\setId().
RevisionDbTestBase::provideInsertOn_exceptionOnIncomplete | ( | ) |
Definition at line 299 of file RevisionDbTestBase.php.
References $content, $user, class, and User\newFromName().
RevisionDbTestBase::provideNewFromArchiveRow | ( | ) |
Definition at line 404 of file RevisionDbTestBase.php.
RevisionDbTestBase::provideUserCan | ( | ) |
Definition at line 1532 of file RevisionDbTestBase.php.
References Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, Revision\DELETED_USER, false, and true.
RevisionDbTestBase::provideUserCanBitfield | ( | ) |
Definition at line 1462 of file RevisionDbTestBase.php.
References Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, Revision\DELETED_USER, false, and true.
|
static |
Definition at line 717 of file RevisionDbTestBase.php.
|
protected |
Reimplemented from MediaWikiTestCase.
Reimplemented in RevisionMcrDbTest.
Definition at line 62 of file RevisionDbTestBase.php.
References createPage(), getContentHandlerUseDB(), getMcrMigrationStage(), getMcrTablesToReset(), MediaWikiTestCase\mergeMwGlobalArrayValue(), MIGRATION_OLD, RevisionTestModifyableContent\MODEL_ID, DummyContentForTesting\MODEL_ID, MediaWikiTestCase\overrideMwServices(), SCHEMA_COMPAT_OLD, and MediaWikiTestCase\setMwGlobals().
RevisionDbTestBase::testFetchRevision | ( | ) |
Definition at line 577 of file RevisionDbTestBase.php.
References $res, $rows, Revision\fetchRevision(), and MediaWikiTestCase\hideDeprecated().
RevisionDbTestBase::testGetComment_notDeleted | ( | ) |
RevisionDbTestBase::testGetContent | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$audience, | |||
$expectedSerialization | |||
) |
provideGetContent Revision::getContent
Definition at line 948 of file RevisionDbTestBase.php.
References $content, $rev, $title, and newTestRevision().
RevisionDbTestBase::testGetContent_failure | ( | ) |
RevisionDbTestBase::testGetContentClone | ( | ) |
Tests whether $rev->getContent() returns a clone when needed.
Definition at line 1023 of file RevisionDbTestBase.php.
References $content, $rev, Title\newFromText(), and Revision\RAW.
RevisionDbTestBase::testGetContentFormat | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedFormat | |||
) |
provideGetContentFormat Revision::getContentFormat
Definition at line 896 of file RevisionDbTestBase.php.
References $rev, $title, and newTestRevision().
RevisionDbTestBase::testGetContentHandler | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedClass | |||
) |
provideGetContentHandler Revision::getContentHandler
Definition at line 915 of file RevisionDbTestBase.php.
References $rev, $title, and newTestRevision().
RevisionDbTestBase::testGetContentModel | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedModel | |||
) |
provideGetContentModel Revision::getContentModel
Definition at line 876 of file RevisionDbTestBase.php.
References $rev, $title, and newTestRevision().
RevisionDbTestBase::testGetContentUncloned | ( | ) |
Tests whether $rev->getContent() returns the same object repeatedly if appropriate.
Definition at line 1059 of file RevisionDbTestBase.php.
References $content, $rev, CONTENT_MODEL_WIKITEXT, newTestRevision(), and Revision\RAW.
RevisionDbTestBase::testGetNext | ( | ) |
Definition at line 652 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetPage | ( | ) |
Definition at line 599 of file RevisionDbTestBase.php.
References $rev, $testPage, makeRevisionWithProps(), and Revision\newFromId().
RevisionDbTestBase::testGetParentLengths_multipleRevIds | ( | ) |
Definition at line 1207 of file RevisionDbTestBase.php.
References $rev, DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetParentLengths_noRevIds | ( | ) |
Definition at line 1175 of file RevisionDbTestBase.php.
References DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetParentLengths_oneRevId | ( | ) |
Definition at line 1188 of file RevisionDbTestBase.php.
References $rev, DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetPrevious | ( | ) |
Definition at line 636 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetRecentChange | ( | ) |
RevisionDbTestBase::testGetSha1 | ( | $text, | |
$model, | |||
$expected_hash | |||
) |
Revision::getSha1 provideGetSha1.
Definition at line 1013 of file RevisionDbTestBase.php.
References $rev, and newTestRevision().
RevisionDbTestBase::testGetSize | ( | $text, | |
$model, | |||
$expected_size | |||
) |
Revision::getSize provideGetSize.
Definition at line 993 of file RevisionDbTestBase.php.
References $rev, and newTestRevision().
RevisionDbTestBase::testGetTextId | ( | $spec, | |
$expected | |||
) |
provideGetTextId Revision::getTextId()
Definition at line 1599 of file RevisionDbTestBase.php.
References $rev.
RevisionDbTestBase::testGetTimestamp | ( | ) |
Definition at line 1286 of file RevisionDbTestBase.php.
References $rev, and wfTimestampNow().
RevisionDbTestBase::testGetTitle_fromExistingRevision | ( | ) |
Definition at line 1230 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetTitle_fromRevisionWhichWillLoadTheTitle | ( | ) |
RevisionDbTestBase::testGetUserAndText | ( | ) |
Revision::getUser Revision::getUserText.
Definition at line 1304 of file RevisionDbTestBase.php.
References $rev, and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testGetVisibility_nothingDeleted | ( | ) |
RevisionDbTestBase::testInsertOn | ( | ) |
Definition at line 698 of file RevisionDbTestBase.php.
References $dbr, $res, DB_REPLICA, makeRevisionWithProps(), IP\toHex(), wfGetDB(), and wfTimestamp().
RevisionDbTestBase::testInsertOn_exceptionOnIncomplete | ( | $array, | |
$expException, | |||
$expMessage | |||
) |
provideInsertOn_exceptionOnIncomplete Revision::insertOn
Definition at line 338 of file RevisionDbTestBase.php.
References $rev, $title, DB_MASTER, Title\newFromText(), MediaWikiTestCase\setMwGlobals(), and wfGetDB().
RevisionDbTestBase::testInsertOn_success | ( | ) |
Definition at line 241 of file RevisionDbTestBase.php.
References $rev, MediaWikiTestCase\assertSelect(), DB_MASTER, MediaWikiTestCase\setMwGlobals(), and wfGetDB().
RevisionDbTestBase::testIsCurrent | ( | ) |
Definition at line 611 of file RevisionDbTestBase.php.
References Revision\newFromId().
RevisionDbTestBase::testIsDeleted_nothingDeleted | ( | ) |
Definition at line 1323 of file RevisionDbTestBase.php.
References $rev, Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, and Revision\DELETED_USER.
RevisionDbTestBase::testIsMinor_false | ( | ) |
RevisionDbTestBase::testIsMinor_true | ( | ) |
Definition at line 1253 of file RevisionDbTestBase.php.
References $rev, EDIT_MINOR, and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testIsUnpatrolled_returnsRecentChangesId | ( | ) |
RevisionDbTestBase::testIsUnpatrolled_returnsZeroIfPatrolled | ( | ) |
Definition at line 1370 of file RevisionDbTestBase.php.
References $rev, and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testLoadFromId | ( | ) |
Definition at line 1071 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), DB_MASTER, MediaWikiTestCase\hideDeprecated(), Revision\loadFromId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageId | ( | ) |
Definition at line 1083 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageIdWithLatestRevId | ( | ) |
Definition at line 1093 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageIdWithNotLatestRevId | ( | ) |
Definition at line 1107 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromTimestamp | ( | ) |
Definition at line 1161 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTimestamp(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitle | ( | ) |
Definition at line 1122 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTitle(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitleWithLatestRevId | ( | ) |
Definition at line 1132 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTitle(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitleWithNotLatestRevId | ( | ) |
Definition at line 1146 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTitle(), and wfGetDB().
RevisionDbTestBase::testNewFromArchiveRow | ( | $selectModifier | ) |
provideNewFromArchiveRow Revision::newFromArchiveRow
Definition at line 451 of file RevisionDbTestBase.php.
References $dbr, $res, $rev, $services, assertRevEquals(), CONTENT_MODEL_WIKITEXT, createPage(), DB_REPLICA, Revision\getArchiveQueryInfo(), getContentHandlerUseDB(), getMcrMigrationStage(), Revision\newFromArchiveRow(), Revision\RevisionStore\setContentHandlerUseDB(), MediaWikiTestCase\setService(), and wfGetDB().
RevisionDbTestBase::testNewFromArchiveRowOverrides | ( | ) |
Definition at line 498 of file RevisionDbTestBase.php.
References $dbr, $res, $rev, CONTENT_MODEL_WIKITEXT, createPage(), DB_REPLICA, Revision\getArchiveQueryInfo(), Revision\newFromArchiveRow(), and wfGetDB().
RevisionDbTestBase::testNewFromId | ( | ) |
Definition at line 527 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromId().
RevisionDbTestBase::testNewFromPageId | ( | ) |
Definition at line 536 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromPageId().
RevisionDbTestBase::testNewFromPageIdWithLatestId | ( | ) |
Definition at line 547 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromPageId().
RevisionDbTestBase::testNewFromPageIdWithNotLatestId | ( | ) |
Definition at line 561 of file RevisionDbTestBase.php.
References $content, $rev, assertRevEquals(), and Revision\newFromPageId().
RevisionDbTestBase::testNewFromRow | ( | ) |
Definition at line 387 of file RevisionDbTestBase.php.
References $dbr, $res, $rev, $revQuery, assertRevEquals(), DB_REPLICA, Revision\getQueryInfo(), makeRevisionWithProps(), Revision\newFromRow(), and wfGetDB().
RevisionDbTestBase::testNewFromTitle_withBadId | ( | ) |
Definition at line 376 of file RevisionDbTestBase.php.
References $rev, and Revision\newFromTitle().
RevisionDbTestBase::testNewFromTitle_withId | ( | ) |
Definition at line 364 of file RevisionDbTestBase.php.
References $rev, and Revision\newFromTitle().
RevisionDbTestBase::testNewFromTitle_withoutId | ( | ) |
Definition at line 352 of file RevisionDbTestBase.php.
References $rev, and Revision\newFromTitle().
RevisionDbTestBase::testNewKnownCurrent | ( | ) |
Definition at line 1414 of file RevisionDbTestBase.php.
References $cache, MediaWikiTestCase\$db, $newRev, $rev, assertRevEquals(), DB_MASTER, WANObjectCache\HOLDOFF_NONE, Revision\newKnownCurrent(), MediaWikiTestCase\overrideMwServices(), MediaWikiTestCase\setService(), and wfGetDB().
RevisionDbTestBase::testNewKnownCurrent_returnsFalseWhenTitleDoesntExist | ( | ) |
Definition at line 1456 of file RevisionDbTestBase.php.
References MediaWikiTestCase\$db, DB_MASTER, Revision\newKnownCurrent(), and wfGetDB().
RevisionDbTestBase::testNewKnownCurrent_withPageId | ( | ) |
Definition at line 1444 of file RevisionDbTestBase.php.
References MediaWikiTestCase\$db, $newRev, $rev, assertRevEquals(), DB_MASTER, Revision\newKnownCurrent(), and wfGetDB().
RevisionDbTestBase::testNewNullRevision | ( | ) |
Definition at line 667 of file RevisionDbTestBase.php.
References $rev, DB_MASTER, false, Revision\newNullRevision(), and wfGetDB().
RevisionDbTestBase::testNewNullRevision_badPage | ( | ) |
Definition at line 688 of file RevisionDbTestBase.php.
References $rev, DB_MASTER, Revision\newNullRevision(), and wfGetDB().
RevisionDbTestBase::testSimpleContentGetters | ( | ) |
This is a simple blanket test for all simple content getters and is methods to provide some coverage before the split of Revision into multiple classes for MCR work.
Revision::getContent Revision::getSerializedData Revision::getContentModel Revision::getContentFormat Revision::getContentHandler
Definition at line 1394 of file RevisionDbTestBase.php.
References $rev.
RevisionDbTestBase::testUserCan | ( | $bitField, | |
$field, | |||
$userGroups, | |||
$expected | |||
) |
provideUserCan Revision::userCan
Definition at line 1553 of file RevisionDbTestBase.php.
References $user, MediaWikiTestCase\getTestUser(), and MediaWikiTestCase\setMwGlobals().
RevisionDbTestBase::testUserCanBitfield | ( | $bitField, | |
$field, | |||
$userGroups, | |||
$title, | |||
$expected | |||
) |
provideUserCanBitfield Revision::userCanBitfield
Definition at line 1498 of file RevisionDbTestBase.php.
References $title, $user, MediaWikiTestCase\getTestUser(), Title\newFromText(), MediaWikiTestCase\setMwGlobals(), and Revision\userCanBitfield().
RevisionDbTestBase::testUserWasLastToEdit | ( | $sinceIdx, | |
$expectedLast | |||
) |
Revision::userWasLastToEdit provideUserWasLastToEdit.
Definition at line 728 of file RevisionDbTestBase.php.
References $revQuery, CONTENT_MODEL_WIKITEXT, User\createNew(), DB_MASTER, WikiPage\factory(), MediaWikiTestCase\getDefaultWikitextNS(), Revision\getQueryInfo(), Revision\insertOn(), User\newFromName(), Title\newFromText(), Revision\userWasLastToEdit(), and wfGetDB().
|
private |
Definition at line 20 of file RevisionDbTestBase.php.
Referenced by testGetPage().