MediaWiki  master
MediaWiki\Tests\Maintenance\BackupDumperLoggerTest Class Reference

Tests for log dumps of BackupDumper. More...

Inheritance diagram for MediaWiki\Tests\Maintenance\BackupDumperLoggerTest:
Collaboration diagram for MediaWiki\Tests\Maintenance\BackupDumperLoggerTest:

Public Member Functions

 addDBData ()
 
 testPlain ()
 
 testXmlDumpsBackupUseCaseLogging ()
 
- Public Member Functions inherited from MediaWiki\Tests\Maintenance\DumpTestCase
 expectETAOutput ()
 Checks for test output consisting only of lines containing ETA announcements. More...
 

Public Attributes

 $logId2
 
 $logId3
 
 $userId2
 

Private Member Functions

 addLogEntry ( $type, $subtype, User $user, $ns, $title, $comment=null, $parameters=null)
 adds a log entry to the database. More...
 

Private Attributes

 $logId1
 
 $userId1
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Tests\Maintenance\DumpTestCase
static setUpBeforeClass ()
 
- Protected Member Functions inherited from MediaWiki\Tests\Maintenance\DumpTestCase
 addRevision (WikiPage $page, $text, $summary, $model=CONTENT_MODEL_WIKITEXT)
 Adds a revision to a page, while returning the resuting revision's id. More...
 
 assertDumpSchema ( $fname, $schemaFile)
 Checks an XML file against an XSD schema. More...
 
 checkHasGzip ()
 Skip the test if 'gzip' is not in $PATH. More...
 
 getDumpAsserter ( $schemaVersion=null)
 
 getXmlSchemaPath ( $schemaVersion=null)
 Returns the path to the XML schema file for the given schema version. More...
 
 gunzip ( $fname)
 gunzips the given file and stores the result in the original file name More...
 
 setUp ()
 Default set up function. More...
 
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 
- Protected Attributes inherited from MediaWiki\Tests\Maintenance\DumpTestCase
Exception null $exceptionFromAddDBData = null
 exception to be rethrown once in sound PHPUnit surrounding More...
 
- Static Protected Attributes inherited from MediaWiki\Tests\Maintenance\DumpTestCase
static bool null $hasGzip = null
 Whether the 'gzip' utility is available. More...
 

Detailed Description

Tests for log dumps of BackupDumper.

Some of these tests use the old constuctor for TextPassDumper and the dump() function, while others use the new loadWithArgv( $args ) function and execute(). This is to ensure both the old and new methods work properly.

Database Dump BackupDumper

Definition at line 25 of file backup_LogTest.php.

Member Function Documentation

◆ addDBData()

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::addDBData ( )

◆ addLogEntry()

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::addLogEntry (   $type,
  $subtype,
User  $user,
  $ns,
  $title,
  $comment = null,
  $parameters = null 
)
private

adds a log entry to the database.

Parameters
string$typeType of the log entry
string$subtypeSubtype of the log entry
User$userUser that performs the logged operation
int$nsNumber of the namespace for the entry's target's title
string$titleTitle of the entry's target
string$commentComment of the log entry
array$parameters(optional) accompanying data that is attached to the entry
Returns
int Id of the added log entry

Definition at line 45 of file backup_LogTest.php.

References $title, $type, Title\newFromText(), and null.

Referenced by MediaWiki\Tests\Maintenance\BackupDumperLoggerTest\addDBData().

◆ testPlain()

◆ testXmlDumpsBackupUseCaseLogging()

Member Data Documentation

◆ $logId1

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::$logId1
private

◆ $logId2

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::$logId2

Definition at line 30 of file backup_LogTest.php.

◆ $logId3

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::$logId3

Definition at line 30 of file backup_LogTest.php.

◆ $userId1

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::$userId1
private

Definition at line 29 of file backup_LogTest.php.

◆ $userId2

MediaWiki\Tests\Maintenance\BackupDumperLoggerTest::$userId2

Definition at line 29 of file backup_LogTest.php.


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