MediaWiki  REL1_22
BackupDumperLoggerTest Class Reference

Tests for log dumps of BackupDumper. More...

Inheritance diagram for BackupDumperLoggerTest:
Collaboration diagram for BackupDumperLoggerTest:

List of all members.

Public Member Functions

 addDBData ()
 Stub.
 testPlain ()
 testXmlDumpsBackupUseCaseLogging ()

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.
 assertLogItem ($id, $user_name, $user_id, $comment, $type, $subtype, $title, $parameters=array())
 asserts that the xml reader is at the beginning of a log entry and skips over it while analyzing it.

Private Attributes

 $logId1
 $userId1

Detailed Description

Tests for log dumps of BackupDumper.

Database Dump

Definition at line 8 of file backup_LogTest.php.


Member Function Documentation

Stub.

If a test needs to add additional data to the database, it should implement this method and do so

Reimplemented from MediaWikiTestCase.

Definition at line 46 of file backup_LogTest.php.

References addLogEntry(), array(), and User\newFromName().

BackupDumperLoggerTest::addLogEntry ( type,
subtype,
User user,
ns,
title,
comment = null,
parameters = null 
) [private]

adds a log entry to the database.

Parameters:
$typestring: type of the log entry
$subtypestring: subtype of the log entry
$userUser: user that performs the logged operation
$nsint: number of the namespace for the entry's target's title
$titlestring: title of the entry's target
$commentstring: comment of the log entry
$parametersArray: (optional) accompanying data that is attached to the entry
Returns:
int id of the added log entry

Definition at line 30 of file backup_LogTest.php.

References $comment, $title, and Title\newFromText().

Referenced by addDBData().

BackupDumperLoggerTest::assertLogItem ( id,
user_name,
user_id,
comment,
type,
subtype,
title,
parameters = array() 
) [private]

asserts that the xml reader is at the beginning of a log entry and skips over it while analyzing it.

Parameters:
$idint: id of the log entry
$user_namestring: user name of the log entry's performer
$user_idint: user id of the log entry 's performer
$commentstring|null: comment of the log entry. If null, the comment text is ignored.
$typestring: type of the log entry
$subtypestring: subtype of the log entry
$titlestring: title of the log entry's target
$parametersarray: (optional) unserialized data accompanying the log entry

Definition at line 102 of file backup_LogTest.php.

References $comment, $title, DumpTestCase\assertNodeEnd(), DumpTestCase\assertNodeStart(), DumpTestCase\assertTextNode(), and DumpTestCase\skipWhitespace().

Referenced by testPlain(), and testXmlDumpsBackupUseCaseLogging().


Member Data Documentation

BackupDumperLoggerTest::$logId1 [private]

Definition at line 14 of file backup_LogTest.php.

BackupDumperLoggerTest::$logId2

Definition at line 14 of file backup_LogTest.php.

BackupDumperLoggerTest::$logId3

Definition at line 14 of file backup_LogTest.php.

BackupDumperLoggerTest::$userId1 [private]

Definition at line 13 of file backup_LogTest.php.

BackupDumperLoggerTest::$userId2

Definition at line 13 of file backup_LogTest.php.


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