MediaWiki REL1_33
|
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. | |
static | getTestPrefixFor (IDatabase $db) |
static | getTestSysop () |
Convenience method for getting an immutable admin test user. | |
static | getTestUser ( $groups=[]) |
Convenience method for getting an immutable test user. | |
static | installMockMwServices (Config $configOverrides=null) |
Creates a new "mock" MediaWikiServices instance, and installs it. | |
static | listTables (IMaintainableDatabase $db) |
static | prepareServices (Config $bootstrapConfig) |
static | resetNonServiceCaches () |
Resets some non-service singleton instances and other static caches. | |
static | restoreMwServices () |
Restores the original, non-mock MediaWikiServices instance. | |
static | setUpBeforeClass () |
static | setupTestDB (IMaintainableDatabase $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. | |
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. | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. | |
assertFileContains ( $fileName, $actualData, $createIfMissing=false, $msg='') | |
Check whether file contains given data. | |
assertHTMLEquals ( $expected, $actual, $msg='') | |
Put each HTML element on its own line and then equals() the results. | |
assertSelect ( $table, $fields, $condition, array $expectedRows, array $options=[], array $join_conds=[]) | |
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. | |
checkDbIsSupported () | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. | |
editPage ( $pageName, $text, $summary='', $defaultNs=NS_MAIN) | |
Edits or creates a page/revision. | |
ensureMockDatabaseConnection (IDatabase $db) | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. | |
getExistingTestPage ( $title=null) | |
Returns a WikiPage representing an existing page. | |
getNewTempDirectory () | |
obtains a new temporary directory | |
getNewTempFile () | |
Obtains a new temporary file name. | |
getNonexistingTestPage ( $title=null) | |
Returns a WikiPage representing a non-existing page. | |
getSchemaOverrides (IMaintainableDatabase $db) | |
Stub. | |
insertPage ( $pageName, $text='Sample page for unit test.', $namespace=null, User $user=null) | |
Insert a new page. | |
isTestInDatabaseGroup () | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. | |
markTestSkippedIfDbType ( $type) | |
Skip the test if using the specified database type. | |
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. | |
revisionDelete ( $rev, array $value=[Revision::DELETED_TEXT=> 1], $comment='') | |
Revision-deletes a revision. | |
setIniSetting ( $name, $value) | |
Set an ini setting for the duration of the test. | |
setLogger ( $channel, LoggerInterface $logger) | |
Sets the logger for a specified channel, for the duration of the test. | |
setMwGlobals ( $pairs, $value=null) | |
Sets a global, maintaining a stashed version of the previous global to be restored in tearDown. | |
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() | |
tearDown () | |
truncateTable ( $tableName, IDatabase $db=null) | |
Empties the given table and resets any auto-increment counters. | |
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. | |
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. | |
static | isUsingExternalStoreDB () |
Check whether ExternalStoreDB is being used. | |
static | setupDatabaseWithTestPrefix (IMaintainableDatabase $db, $prefix=null) |
Setups a database with cloned tables using the given prefix. | |
static | setupExternalStoreTestDBs ( $testPrefix=null) |
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 = [] |
RevisionDbTestBase contains test cases for the Revision class that have Database interactions.
Database medium
Definition at line 15 of file RevisionDbTestBase.php.
Reimplemented from MediaWikiTestCase.
Definition at line 22 of file RevisionDbTestBase.php.
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 49 of file RevisionDbTestBase.php.
Definition at line 202 of file RevisionDbTestBase.php.
References $rev, and(), 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, and(), CONTENT_MODEL_WIKITEXT, EDIT_NEW, and MediaWikiTestCase\getDefaultWikitextNS().
Referenced by setUp(), testNewFromArchiveRow(), and testNewFromArchiveRowOverrides().
|
abstractprotected |
Reimplemented in RevisionMcrDbTest, RevisionMcrReadNewDbTest, RevisionMcrWriteBothDbTest, RevisionNoContentModelDbTest, and RevisionPreMcrDbTest.
Referenced by setUp(), and testNewFromArchiveRow().
|
abstractprotected |
Referenced by setUp().
|
abstractprotected |
Referenced by setUp().
|
protected |
string | $model |
Definition at line 112 of file RevisionDbTestBase.php.
References and(), any, and MediaWikiTestCase\getDefaultWikitextNS().
Referenced by RevisionMcrDbTest\provideGetTextId(), and RevisionMcrReadNewDbTest\provideGetTextId().
|
private |
Definition at line 134 of file RevisionDbTestBase.php.
References $rev, and(), 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 815 of file RevisionDbTestBase.php.
References $content, $rev, and and().
Referenced by testGetContent(), testGetContentFormat(), testGetContentHandler(), testGetContentModel(), testGetContentUncloned(), testGetSha1(), and testGetSize().
RevisionDbTestBase::provideGetContent | ( | ) |
Definition at line 900 of file RevisionDbTestBase.php.
References Revision\FOR_PUBLIC, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetContentFormat | ( | ) |
Definition at line 861 of file RevisionDbTestBase.php.
References CONTENT_FORMAT_CSS, CONTENT_FORMAT_WIKITEXT, CONTENT_MODEL_CSS, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetContentHandler | ( | ) |
Definition at line 881 of file RevisionDbTestBase.php.
References serialize().
RevisionDbTestBase::provideGetContentModel | ( | ) |
Definition at line 842 of file RevisionDbTestBase.php.
References CONTENT_MODEL_CSS, CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetRevisionText | ( | ) |
Reimplemented in RevisionMcrDbTest, and RevisionMcrReadNewDbTest.
Definition at line 1588 of file RevisionDbTestBase.php.
RevisionDbTestBase::provideGetSha1 | ( | ) |
Definition at line 977 of file RevisionDbTestBase.php.
References Revision\base36Sha1(), CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetSize | ( | ) |
Definition at line 961 of file RevisionDbTestBase.php.
References CONTENT_MODEL_WIKITEXT, DummyContentForTesting\MODEL_ID, and serialize().
RevisionDbTestBase::provideGetTextId | ( | ) |
Reimplemented in RevisionMcrDbTest, RevisionMcrReadNewDbTest, RevisionMcrWriteBothDbTest, RevisionNoContentModelDbTest, and RevisionPreMcrDbTest.
Definition at line 1560 of file RevisionDbTestBase.php.
References and(), CONTENT_MODEL_WIKITEXT, and null.
RevisionDbTestBase::provideInsertOn_exceptionOnIncomplete | ( | ) |
Definition at line 299 of file RevisionDbTestBase.php.
References $content, $user, and User\newFromName().
RevisionDbTestBase::provideNewFromArchiveRow | ( | ) |
Definition at line 404 of file RevisionDbTestBase.php.
RevisionDbTestBase::provideUserCan | ( | ) |
Definition at line 1516 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 1446 of file RevisionDbTestBase.php.
References and(), Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, Revision\DELETED_USER, false, and true.
|
static |
Definition at line 696 of file RevisionDbTestBase.php.
|
protected |
Reimplemented from MediaWikiTestCase.
Reimplemented in RevisionMcrDbTest.
Definition at line 63 of file RevisionDbTestBase.php.
References createPage(), getContentHandlerUseDB(), getMcrMigrationStage(), getMcrTablesToReset(), MediaWikiTestCase\mergeMwGlobalArrayValue(), RevisionTestModifyableContent\MODEL_ID, DummyContentForTesting\MODEL_ID, MediaWikiTestCase\overrideMwServices(), SCHEMA_COMPAT_NEW, and MediaWikiTestCase\setMwGlobals().
RevisionDbTestBase::testGetComment_notDeleted | ( | ) |
Definition at line 1323 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetContent | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$audience, | |||
$expectedSerialization ) |
provideGetContent Revision::getContent
Definition at line 927 of file RevisionDbTestBase.php.
References $content, $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetContent_failure | ( | ) |
Definition at line 942 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetContentClone | ( | ) |
Tests whether $rev->getContent() returns a clone when needed.
Definition at line 1002 of file RevisionDbTestBase.php.
References $content, $rev, and(), and Revision\RAW.
RevisionDbTestBase::testGetContentFormat | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedFormat ) |
provideGetContentFormat Revision::getContentFormat
Definition at line 875 of file RevisionDbTestBase.php.
References $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetContentHandler | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedClass ) |
provideGetContentHandler Revision::getContentHandler
Definition at line 894 of file RevisionDbTestBase.php.
References $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetContentModel | ( | $text, | |
$title, | |||
$model, | |||
$format, | |||
$expectedModel ) |
provideGetContentModel Revision::getContentModel
Definition at line 855 of file RevisionDbTestBase.php.
References $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetContentUncloned | ( | ) |
Tests whether $rev->getContent() returns the same object repeatedly if appropriate.
Definition at line 1038 of file RevisionDbTestBase.php.
References $content, $rev, and(), CONTENT_MODEL_WIKITEXT, newTestRevision(), and Revision\RAW.
RevisionDbTestBase::testGetNext | ( | ) |
RevisionDbTestBase::testGetPage | ( | ) |
Definition at line 578 of file RevisionDbTestBase.php.
References $rev, $testPage, and(), makeRevisionWithProps(), and Revision\newFromId().
RevisionDbTestBase::testGetParentLengths_multipleRevIds | ( | ) |
Definition at line 1186 of file RevisionDbTestBase.php.
References $rev, and(), DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetParentLengths_noRevIds | ( | ) |
Definition at line 1154 of file RevisionDbTestBase.php.
References and(), DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetParentLengths_oneRevId | ( | ) |
Definition at line 1167 of file RevisionDbTestBase.php.
References $rev, and(), DB_MASTER, Revision\getParentLengths(), and wfGetDB().
RevisionDbTestBase::testGetPrevious | ( | ) |
RevisionDbTestBase::testGetRecentChange | ( | ) |
Definition at line 217 of file RevisionDbTestBase.php.
provideGetRevisionText Revision::getRevisionText
Definition at line 1598 of file RevisionDbTestBase.php.
References $rev, and(), Revision\getQueryInfo(), Revision\getRevisionText(), and MediaWikiTestCase\hideDeprecated().
RevisionDbTestBase::testGetSha1 | ( | $text, | |
$model, | |||
$expected_hash ) |
Revision::getSha1 provideGetSha1.
Definition at line 992 of file RevisionDbTestBase.php.
References $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetSize | ( | $text, | |
$model, | |||
$expected_size ) |
Revision::getSize provideGetSize.
Definition at line 972 of file RevisionDbTestBase.php.
References $rev, and(), and newTestRevision().
RevisionDbTestBase::testGetTextId | ( | $spec, | |
$expected ) |
provideGetTextId Revision::getTextId()
Definition at line 1583 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetTimestamp | ( | ) |
Definition at line 1265 of file RevisionDbTestBase.php.
References $rev, and(), and wfTimestampNow().
RevisionDbTestBase::testGetTitle_fromExistingRevision | ( | ) |
RevisionDbTestBase::testGetTitle_fromRevisionWhichWillLoadTheTitle | ( | ) |
Definition at line 1220 of file RevisionDbTestBase.php.
RevisionDbTestBase::testGetUserAndText | ( | ) |
Revision::getUser Revision::getUserText.
Definition at line 1283 of file RevisionDbTestBase.php.
References $rev, and(), and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testGetVisibility_nothingDeleted | ( | ) |
Definition at line 1314 of file RevisionDbTestBase.php.
RevisionDbTestBase::testInsertOn | ( | ) |
Definition at line 677 of file RevisionDbTestBase.php.
References $dbr, $res, and(), DB_REPLICA, makeRevisionWithProps(), wfGetDB(), and wfTimestamp().
RevisionDbTestBase::testInsertOn_exceptionOnIncomplete | ( | $array, | |
$expException, | |||
$expMessage ) |
provideInsertOn_exceptionOnIncomplete Revision::insertOn
Definition at line 338 of file RevisionDbTestBase.php.
References $rev, and(), DB_MASTER, MediaWikiTestCase\setMwGlobals(), and wfGetDB().
RevisionDbTestBase::testInsertOn_success | ( | ) |
Definition at line 241 of file RevisionDbTestBase.php.
References $rev, and(), MediaWikiTestCase\assertSelect(), DB_MASTER, MediaWikiTestCase\setMwGlobals(), and wfGetDB().
RevisionDbTestBase::testIsCurrent | ( | ) |
Definition at line 590 of file RevisionDbTestBase.php.
References and(), and Revision\newFromId().
RevisionDbTestBase::testIsDeleted_nothingDeleted | ( | ) |
Definition at line 1302 of file RevisionDbTestBase.php.
References $rev, and(), Revision\DELETED_COMMENT, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, and Revision\DELETED_USER.
RevisionDbTestBase::testIsMinor_false | ( | ) |
Definition at line 1251 of file RevisionDbTestBase.php.
RevisionDbTestBase::testIsMinor_true | ( | ) |
Definition at line 1232 of file RevisionDbTestBase.php.
References $rev, and(), EDIT_MINOR, and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testIsUnpatrolled_returnsRecentChangesId | ( | ) |
Definition at line 1338 of file RevisionDbTestBase.php.
RevisionDbTestBase::testIsUnpatrolled_returnsZeroIfPatrolled | ( | ) |
Definition at line 1349 of file RevisionDbTestBase.php.
References $rev, and(), and MediaWikiTestCase\getTestSysop().
RevisionDbTestBase::testLoadFromId | ( | ) |
Definition at line 1050 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), DB_MASTER, MediaWikiTestCase\hideDeprecated(), Revision\loadFromId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageId | ( | ) |
Definition at line 1062 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageIdWithLatestRevId | ( | ) |
Definition at line 1072 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromPageIdWithNotLatestRevId | ( | ) |
Definition at line 1086 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromPageId(), and wfGetDB().
RevisionDbTestBase::testLoadFromTimestamp | ( | ) |
Definition at line 1140 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTimestamp(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitle | ( | ) |
Definition at line 1101 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTitle(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitleWithLatestRevId | ( | ) |
Definition at line 1111 of file RevisionDbTestBase.php.
References assertRevEquals(), DB_MASTER, Revision\loadFromTitle(), and wfGetDB().
RevisionDbTestBase::testLoadFromTitleWithNotLatestRevId | ( | ) |
Definition at line 1125 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, and(), assertRevEquals(), CONTENT_MODEL_WIKITEXT, createPage(), DB_REPLICA, Revision\getArchiveQueryInfo(), getContentHandlerUseDB(), Revision\newFromArchiveRow(), MediaWikiTestCase\setService(), and wfGetDB().
RevisionDbTestBase::testNewFromArchiveRowOverrides | ( | ) |
Definition at line 499 of file RevisionDbTestBase.php.
References $dbr, $res, $rev, and(), CONTENT_MODEL_WIKITEXT, createPage(), DB_REPLICA, Revision\getArchiveQueryInfo(), Revision\newFromArchiveRow(), and wfGetDB().
RevisionDbTestBase::testNewFromId | ( | ) |
Definition at line 528 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromId().
RevisionDbTestBase::testNewFromPageId | ( | ) |
Definition at line 537 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromPageId().
RevisionDbTestBase::testNewFromPageIdWithLatestId | ( | ) |
Definition at line 548 of file RevisionDbTestBase.php.
References $rev, assertRevEquals(), and Revision\newFromPageId().
RevisionDbTestBase::testNewFromPageIdWithNotLatestId | ( | ) |
Definition at line 562 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, and(), assertRevEquals(), DB_REPLICA, Revision\getQueryInfo(), makeRevisionWithProps(), Revision\newFromRow(), and wfGetDB().
RevisionDbTestBase::testNewFromTitle_withBadId | ( | ) |
Definition at line 376 of file RevisionDbTestBase.php.
References $rev, and(), and Revision\newFromTitle().
RevisionDbTestBase::testNewFromTitle_withId | ( | ) |
Definition at line 364 of file RevisionDbTestBase.php.
References $rev, and(), and Revision\newFromTitle().
RevisionDbTestBase::testNewFromTitle_withoutId | ( | ) |
Definition at line 352 of file RevisionDbTestBase.php.
References $rev, and(), and Revision\newFromTitle().
RevisionDbTestBase::testNewKnownCurrent | ( | ) |
Definition at line 1393 of file RevisionDbTestBase.php.
References $cache, MediaWikiTestCase\$db, $newRev, $rev, and(), assertRevEquals(), DB_MASTER, Wikimedia\Rdbms\Database\getDomainID(), Revision\newKnownCurrent(), MediaWikiTestCase\overrideMwServices(), MediaWikiTestCase\setService(), and wfGetDB().
RevisionDbTestBase::testNewKnownCurrent_returnsFalseWhenTitleDoesntExist | ( | ) |
Definition at line 1440 of file RevisionDbTestBase.php.
References MediaWikiTestCase\$db, and(), DB_MASTER, Revision\newKnownCurrent(), and wfGetDB().
RevisionDbTestBase::testNewKnownCurrent_withPageId | ( | ) |
Definition at line 1428 of file RevisionDbTestBase.php.
References MediaWikiTestCase\$db, $newRev, $rev, assertRevEquals(), DB_MASTER, Revision\newKnownCurrent(), and wfGetDB().
RevisionDbTestBase::testNewNullRevision | ( | ) |
Definition at line 646 of file RevisionDbTestBase.php.
References $rev, and(), DB_MASTER, Revision\newNullRevision(), and wfGetDB().
RevisionDbTestBase::testNewNullRevision_badPage | ( | ) |
Definition at line 667 of file RevisionDbTestBase.php.
References $rev, and(), 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 1373 of file RevisionDbTestBase.php.
RevisionDbTestBase::testUserCan | ( | $bitField, | |
$field, | |||
$userGroups, | |||
$expected ) |
provideUserCan Revision::userCan
Definition at line 1537 of file RevisionDbTestBase.php.
References and(), MediaWikiTestCase\getTestUser(), and MediaWikiTestCase\setMwGlobals().
RevisionDbTestBase::testUserCanBitfield | ( | $bitField, | |
$field, | |||
$userGroups, | |||
$title, | |||
$expected ) |
provideUserCanBitfield Revision::userCanBitfield
Definition at line 1482 of file RevisionDbTestBase.php.
References and(), MediaWikiTestCase\getTestUser(), MediaWikiTestCase\setMwGlobals(), and Revision\userCanBitfield().
RevisionDbTestBase::testUserWasLastToEdit | ( | $sinceIdx, | |
$expectedLast ) |
Revision::userWasLastToEdit provideUserWasLastToEdit.
Definition at line 707 of file RevisionDbTestBase.php.
References $revQuery, and(), CONTENT_MODEL_WIKITEXT, User\createNew(), DB_MASTER, MediaWikiTestCase\getDefaultWikitextNS(), Revision\getQueryInfo(), User\newFromName(), Revision\userWasLastToEdit(), and wfGetDB().
|
private |
Definition at line 20 of file RevisionDbTestBase.php.
Referenced by testGetPage().