MediaWiki REL1_33
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
 
 testGetContent ()
 
 testGetContent_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetSlot_audience
 
 testGetSlot ()
 
 testGetSlot_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetSlot_audience
 
 testGetUser_audience ( $visibility, $groups, $userCan, $publicCan)
 provideGetUser_audience
 
 testHasSameContent ( $expected, $recordSpec1, $recordSpec2)
 provideHasSameContent \MediaWiki\Revision\RevisionRecord::hasSameContent Database
 
 testHasSlot ()
 
 testIsDeleted ( $revDeleted, $assertionMap)
 provideIsDeleted \MediaWiki\Revision\RevisionRecord::isDeleted
 
 testIsReadyForInsertion ()
 
 testSerialization_fails ()
 
 testUserCanBitfield ( $bitField, $field, $userGroups, $title, $expected)
 provideUserCanBitfield \MediaWiki\Revision\RevisionRecord::userCanBitfield
 

Variables

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

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.

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 ( )

Definition at line 381 of file RevisionRecordTests.php.

◆ provideIsDeleted()

MediaWiki\Tests\Revision\provideIsDeleted ( )

Definition at line 470 of file RevisionRecordTests.php.

◆ provideUserCanBitfield()

MediaWiki\Tests\Revision\provideUserCanBitfield ( )

Definition at line 275 of file RevisionRecordTests.php.

References false, and true.

◆ testGetComment_audience()

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

provideGetComment_audience

Definition at line 131 of file RevisionRecordTests.php.

References $rev, $user, and MediaWiki\Tests\Revision\forceStandardPermissions().

◆ testGetContent()

MediaWiki\Tests\Revision\testGetContent ( )

Definition at line 267 of file RevisionRecordTests.php.

References $content, $rev, and CONTENT_MODEL_TEXT.

◆ testGetContent_audience()

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

provideGetSlot_audience

Definition at line 232 of file RevisionRecordTests.php.

References $rev, $user, and MediaWiki\Tests\Revision\forceStandardPermissions().

◆ testGetSlot()

MediaWiki\Tests\Revision\testGetSlot ( )

Definition at line 252 of file RevisionRecordTests.php.

References $rev.

◆ testGetSlot_audience()

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

provideGetSlot_audience

Definition at line 185 of file RevisionRecordTests.php.

References $rev, $user, and MediaWiki\Tests\Revision\forceStandardPermissions().

◆ testGetUser_audience()

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

provideGetUser_audience

Definition at line 158 of file RevisionRecordTests.php.

References $rev, $user, and MediaWiki\Tests\Revision\forceStandardPermissions().

◆ testHasSameContent()

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

provideHasSameContent \MediaWiki\Revision\RevisionRecord::hasSameContent Database

Definition at line 456 of file RevisionRecordTests.php.

References MediaWiki\Tests\Revision\makeHasSameContentTestRecord().

◆ testHasSlot()

MediaWiki\Tests\Revision\testHasSlot ( )

Definition at line 260 of file RevisionRecordTests.php.

References $rev.

◆ 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, and serialize().

◆ testUserCanBitfield()

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

provideUserCanBitfield \MediaWiki\Revision\RevisionRecord::userCanBitfield

Definition at line 365 of file RevisionRecordTests.php.

References $title, $user, and MediaWiki\Tests\Revision\forceStandardPermissions().

Variable Documentation

◆ McrReadNewSchemaOverride

trait MediaWiki::Tests::Revision\McrReadNewSchemaOverride
Initial value:
{
use PatchFileLocation
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use

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 = [] )
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))

\MediaWiki\Revision\RevisionRecord

Note
Expects to be used in classes that extend MediaWikiTestCase.

Definition at line 23 of file RevisionRecordTests.php.