MediaWiki  master
PageArchiveTestBase Class Reference

Base class for tests of PageArchive against different database schemas. More...

Inheritance diagram for PageArchiveTestBase:
Collaboration diagram for PageArchiveTestBase:

Public Member Functions

 __construct ( $name=null, array $data=[], $dataName='')
 
 provideGetTextFromRowThrowsInvalidArgumentException ()
 
 testGetArchivedRevision ()
 PageArchive::getRevision. More...
 
 testGetLastRevisionId ()
 PageArchive::getLastRevisionId. More...
 
 testGetPreviousRevision ()
 PageArchive::getPreviousRevision. More...
 
 testGetRevision ()
 PageArchive::getRevision. More...
 
 testIsDeleted ()
 PageArchive::isDeleted. More...
 
 testListPagesByPrefix ()
 PageArchive::listPagesBySearch. More...
 
 testListPagesBySearch ()
 PageArchive::listPagesBySearch. More...
 
 testListRevisions ()
 PageArchive::listRevisions. More...
 
 testUndeleteRevisions ()
 PageArchive::undelete PageArchive::undeleteRevisions. More...
 

Protected Member Functions

 addCoreDBData ()
 
 getContentHandlerUseDB ()
 
 getExpectedArchiveRows ()
 
 getMcrMigrationStage ()
 
 getMcrTablesToReset ()
 
 setUp ()
 

Protected Attributes

 $archivedPage
 
RevisionRecord $firstRev
 Revision of the first (initial) edit. More...
 
 $ipEditor
 A logged out user who edited the page before it was archived. More...
 
RevisionRecord $ipRev
 Revision of the IP edit (the second edit) More...
 
int $pageId
 

Detailed Description

Base class for tests of PageArchive against different database schemas.

Definition at line 9 of file PageArchiveTestBase.php.

Constructor & Destructor Documentation

◆ __construct()

PageArchiveTestBase::__construct (   $name = null,
array  $data = [],
  $dataName = '' 
)

Definition at line 39 of file PageArchiveTestBase.php.

References $name.

Member Function Documentation

◆ addCoreDBData()

PageArchiveTestBase::addCoreDBData ( )
protected

Definition at line 59 of file PageArchiveTestBase.php.

References getMcrMigrationStage(), and getMcrTablesToReset().

◆ getContentHandlerUseDB()

PageArchiveTestBase::getContentHandlerUseDB ( )
protected
Returns
bool

Definition at line 77 of file PageArchiveTestBase.php.

Referenced by setUp().

◆ getExpectedArchiveRows()

PageArchiveTestBase::getExpectedArchiveRows ( )
abstractprotected

◆ getMcrMigrationStage()

PageArchiveTestBase::getMcrMigrationStage ( )
abstractprotected
Returns
int

Referenced by addCoreDBData(), and setUp().

◆ getMcrTablesToReset()

PageArchiveTestBase::getMcrTablesToReset ( )
abstractprotected
Returns
string[]

Referenced by addCoreDBData(), and setUp().

◆ provideGetTextFromRowThrowsInvalidArgumentException()

PageArchiveTestBase::provideGetTextFromRowThrowsInvalidArgumentException ( )

Definition at line 249 of file PageArchiveTestBase.php.

References null.

◆ setUp()

◆ testGetArchivedRevision()

PageArchiveTestBase::testGetArchivedRevision ( )

PageArchive::getRevision.

Definition at line 286 of file PageArchiveTestBase.php.

References $rev.

◆ testGetLastRevisionId()

PageArchiveTestBase::testGetLastRevisionId ( )

◆ testGetPreviousRevision()

◆ testGetRevision()

PageArchiveTestBase::testGetRevision ( )

PageArchive::getRevision.

Definition at line 274 of file PageArchiveTestBase.php.

References $rev.

◆ testIsDeleted()

PageArchiveTestBase::testIsDeleted ( )

PageArchive::isDeleted.

Definition at line 267 of file PageArchiveTestBase.php.

◆ testListPagesByPrefix()

PageArchiveTestBase::testListPagesByPrefix ( )

◆ testListPagesBySearch()

PageArchiveTestBase::testListPagesBySearch ( )

◆ testListRevisions()

PageArchiveTestBase::testListRevisions ( )

◆ testUndeleteRevisions()

Member Data Documentation

◆ $archivedPage

PageArchive PageArchiveTestBase::$archivedPage
protected

Definition at line 19 of file PageArchiveTestBase.php.

◆ $firstRev

RevisionRecord PageArchiveTestBase::$firstRev
protected

Revision of the first (initial) edit.

Definition at line 31 of file PageArchiveTestBase.php.

◆ $ipEditor

string PageArchiveTestBase::$ipEditor
protected

A logged out user who edited the page before it was archived.

Definition at line 25 of file PageArchiveTestBase.php.

Referenced by PageArchivePreMcrTest\getExpectedArchiveRows(), PageArchiveMcrTest\getExpectedArchiveRows(), and setUp().

◆ $ipRev

RevisionRecord PageArchiveTestBase::$ipRev
protected

Revision of the IP edit (the second edit)

Definition at line 37 of file PageArchiveTestBase.php.

◆ $pageId

int PageArchiveTestBase::$pageId
protected

Definition at line 14 of file PageArchiveTestBase.php.


The documentation for this class was generated from the following file: