MediaWiki  1.33.0
MediaWiki\Tests\Revision Namespace Reference

Classes

class  FallbackSlotRoleHandlerTest
 \MediaWiki\Revision\FallbackSlotRoleHandler More...
 
class  MainSlotRoleHandlerTest
 \MediaWiki\Revision\MainSlotRoleHandler More...
 
class  McrReadNewRevisionStoreDbTest
 Tests RevisionStore against the intermediate MCR DB schema for use during schema migration. More...
 
class  McrRevisionStoreDbTest
 Tests RevisionStore against the post-migration MCR DB schema. More...
 
class  McrWriteBothRevisionStoreDbTest
 Tests RevisionStore against the intermediate MCR DB schema for use during schema migration. More...
 
class  MutableRevisionRecordTest
 \MediaWiki\Revision\MutableRevisionRecord \MediaWiki\Revision\RevisionRecord More...
 
class  MutableRevisionSlotsTest
 \MediaWiki\Revision\MutableRevisionSlots More...
 
class  NoContentModelRevisionStoreDbTest
 Tests RevisionStore against the pre-MCR, pre-ContentHandler DB schema. More...
 
class  PreMcrRevisionStoreDbTest
 Tests RevisionStore against the pre-MCR DB schema. More...
 
class  RenderedRevisionTest
 \MediaWiki\Revision\RenderedRevision More...
 
class  RevisionArchiveRecordTest
 \MediaWiki\Revision\RevisionArchiveRecord \MediaWiki\Revision\RevisionRecord More...
 
class  RevisionQueryInfoTest
 Tests RevisionStore against the post-migration MCR DB schema. More...
 
class  RevisionRendererTest
 \MediaWiki\Revision\RevisionRenderer More...
 
class  RevisionSlotsTest
 
class  RevisionStoreCacheRecordTest
 \MediaWiki\Revision\RevisionStoreCacheRecord \MediaWiki\Revision\RevisionStoreRecord \MediaWiki\Revision\RevisionRecord More...
 
class  RevisionStoreDbTestBase
 Database RevisionStore. More...
 
class  RevisionStoreFactoryTest
 
class  RevisionStoreRecordTest
 \MediaWiki\Revision\RevisionStoreRecord \MediaWiki\Revision\RevisionRecord More...
 
class  RevisionStoreTest
 Tests RevisionStore. More...
 
class  SlotRecordTest
 \MediaWiki\Revision\SlotRecord More...
 
class  SlotRoleHandlerTest
 \MediaWiki\Revision\SlotRoleHandler More...
 
class  SlotRoleRegistryTest
 \MediaWiki\Revision\SlotRoleRegistry More...
 

Functions

 forceStandardPermissions ()
 
 getMcrMigrationStage ()
 
 getMcrTablesToReset ()
 
 getSchemaOverrides (IMaintainableDatabase $db)
 
 makeHasSameContentTestRecord (array $slots, $revId)
 
 provideAudienceCheckData ( $field)
 
 provideGetComment_audience ()
 
 provideGetSlot_audience ()
 
 provideGetUser_audience ()
 
 provideHasSameContent ()
 
 provideIsDeleted ()
 
 provideUserCanBitfield ()
 
 testGetComment_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetComment_audience More...
 
 testGetContent ()
 
 testGetContent_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetSlot_audience More...
 
 testGetSlot ()
 
 testGetSlot_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetSlot_audience More...
 
 testGetUser_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetUser_audience More...
 
 testHasSameContent ( $expected, $recordSpec1, $recordSpec2)
 provideHasSameContent \MediaWiki\Revision\RevisionRecord::hasSameContent Database More...
 
 testHasSlot ()
 
 testIsDeleted ( $revDeleted, $assertionMap)
 provideIsDeleted \MediaWiki\Revision\RevisionRecord::isDeleted More...
 
 testIsReadyForInsertion ()
 
 testSerialization_fails ()
 
 testUserCanBitfield ( $bitField, $field, $userGroups, $title, $expected)
 provideUserCanBitfield \MediaWiki\Revision\RevisionRecord::userCanBitfield More...
 

Variables

trait McrReadNewSchemaOverride
 Trait providing schema overrides that allow tests to run against the intermediate MCR database schema for use during schema migration. More...
 
trait McrSchemaOverride
 Trait providing schema overrides that allow tests to run against the post-migration MCR database schema. More...
 
trait McrWriteBothSchemaOverride
 Trait providing schema overrides that allow tests to run against the intermediate MCR database schema for use during schema migration. More...
 
trait PreMcrSchemaOverride
 Trait providing schema overrides that allow tests to run against the pre-MCR database schema. More...
 
trait RevisionRecordTests
 \MediaWiki\Revision\RevisionRecord More...
 

Function Documentation

◆ forceStandardPermissions()

◆ getMcrMigrationStage()

MediaWiki::Tests::Revision::getMcrMigrationStage ( )
protected
Returns
int

Definition at line 19 of file McrReadNewSchemaOverride.php.

References SCHEMA_COMPAT_READ_NEW, and SCHEMA_COMPAT_WRITE_BOTH.

◆ getMcrTablesToReset()

MediaWiki::Tests::Revision::getMcrTablesToReset ( )
protected
Returns
string[]

Definition at line 26 of file McrReadNewSchemaOverride.php.

◆ getSchemaOverrides()

MediaWiki::Tests::Revision::getSchemaOverrides ( IMaintainableDatabase  $db)
protected
Returns
array[]

Definition at line 33 of file McrReadNewSchemaOverride.php.

◆ makeHasSameContentTestRecord()

MediaWiki\Tests\Revision\makeHasSameContentTestRecord ( array  $slots,
  $revId 
)
private
Note
Do not call directly from a data provider! Data providers cannot instantiate Title objects! See T202641.
Parameters
SlotRecord[]$slots
int$revId
Returns
RevisionStoreRecord

Definition at line 427 of file RevisionRecordTests.php.

References $title, Title\newFromText(), and CommentStoreComment\newUnsavedComment().

Referenced by MediaWiki\Tests\Revision\testHasSameContent().

◆ provideAudienceCheckData()

◆ provideGetComment_audience()

MediaWiki\Tests\Revision\provideGetComment_audience ( )

◆ provideGetSlot_audience()

MediaWiki\Tests\Revision\provideGetSlot_audience ( )

◆ provideGetUser_audience()

MediaWiki\Tests\Revision\provideGetUser_audience ( )

◆ provideHasSameContent()

MediaWiki\Tests\Revision\provideHasSameContent ( )

◆ provideIsDeleted()

◆ provideUserCanBitfield()

◆ testGetComment_audience()

MediaWiki\Tests\Revision\testGetComment_audience (   $visibility,
  $groups,
  $userCan,
  $publicCan 
)

◆ testGetContent()

MediaWiki\Tests\Revision\testGetContent ( )

Definition at line 267 of file RevisionRecordTests.php.

References $content, $rev, CONTENT_MODEL_TEXT, and Revision\SlotRecord\MAIN.

◆ testGetContent_audience()

MediaWiki\Tests\Revision\testGetContent_audience (   $visibility,
  $groups,
  $userCan,
  $publicCan 
)

◆ testGetSlot()

MediaWiki\Tests\Revision\testGetSlot ( )

Definition at line 252 of file RevisionRecordTests.php.

References $rev, and Revision\SlotRecord\MAIN.

◆ testGetSlot_audience()

MediaWiki\Tests\Revision\testGetSlot_audience (   $visibility,
  $groups,
  $userCan,
  $publicCan 
)

◆ testGetUser_audience()

MediaWiki\Tests\Revision\testGetUser_audience (   $visibility,
  $groups,
  $userCan,
  $publicCan 
)

◆ testHasSameContent()

MediaWiki\Tests\Revision\testHasSameContent (   $expected,
  $recordSpec1,
  $recordSpec2 
)

◆ testHasSlot()

MediaWiki\Tests\Revision\testHasSlot ( )

Definition at line 260 of file RevisionRecordTests.php.

References $rev, and Revision\SlotRecord\MAIN.

◆ testIsDeleted()

MediaWiki\Tests\Revision\testIsDeleted (   $revDeleted,
  $assertionMap 
)

provideIsDeleted \MediaWiki\Revision\RevisionRecord::isDeleted

Definition at line 516 of file RevisionRecordTests.php.

References $rev, and as.

◆ testIsReadyForInsertion()

MediaWiki\Tests\Revision\testIsReadyForInsertion ( )

Definition at line 523 of file RevisionRecordTests.php.

References $rev.

◆ testSerialization_fails()

MediaWiki\Tests\Revision\testSerialization_fails ( )

Definition at line 92 of file RevisionRecordTests.php.

References $rev, class, and serialize().

◆ testUserCanBitfield()

MediaWiki\Tests\Revision\testUserCanBitfield (   $bitField,
  $field,
  $userGroups,
  $title,
  $expected 
)

Variable Documentation

◆ McrReadNewSchemaOverride

trait MediaWiki::Tests::Revision\McrReadNewSchemaOverride
Initial value:
{
use PatchFileLocation

Trait providing schema overrides that allow tests to run against the intermediate MCR database schema for use during schema migration.

Definition at line 11 of file McrReadNewSchemaOverride.php.

◆ McrSchemaOverride

trait MediaWiki::Tests::Revision\McrSchemaOverride
Initial value:
{
use PatchFileLocation

Trait providing schema overrides that allow tests to run against the post-migration MCR database schema.

Definition at line 11 of file McrSchemaOverride.php.

◆ McrWriteBothSchemaOverride

trait MediaWiki::Tests::Revision\McrWriteBothSchemaOverride
Initial value:
{
use PatchFileLocation

Trait providing schema overrides that allow tests to run against the intermediate MCR database schema for use during schema migration.

Definition at line 11 of file McrWriteBothSchemaOverride.php.

◆ PreMcrSchemaOverride

trait MediaWiki::Tests::Revision\PreMcrSchemaOverride
Initial value:
{
use PatchFileLocation

Trait providing schema overrides that allow tests to run against the pre-MCR database schema.

Definition at line 10 of file PreMcrSchemaOverride.php.

◆ RevisionRecordTests

trait MediaWiki::Tests::Revision\RevisionRecordTests
Initial value:
{
abstract protected function newRevision( array $rowOverrides = [] )

\MediaWiki\Revision\RevisionRecord

Note
Expects to be used in classes that extend MediaWikiTestCase.

Definition at line 23 of file RevisionRecordTests.php.

use
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:10
array
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))