|
MediaWiki
REL1_23
|
Tests for log dumps of BackupDumper. More...


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 | |
Tests for log dumps of BackupDumper.
Database Dump BackupDumper
Definition at line 9 of file backup_LogTest.php.
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 $e, 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.
| $type | string: type of the log entry |
| $subtype | string: subtype of the log entry |
| $user | User: user that performs the logged operation |
| $ns | int: number of the namespace for the entry's target's title |
| $title | string: title of the entry's target |
| $comment | string: comment of the log entry |
| $parameters | Array: (optional) accompanying data that is attached to the 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.
| $id | int: id of the log entry |
| $user_name | string: user name of the log entry's performer |
| $user_id | int: user id of the log entry 's performer |
| $comment | string|null: comment of the log entry. If null, the comment text is ignored. |
| $type | string: type of the log entry |
| $subtype | string: subtype of the log entry |
| $title | string: title of the log entry's target |
| $parameters | array: (optional) unserialized data accompanying the log entry |
Definition at line 101 of file backup_LogTest.php.
References $comment, $title, DumpTestCase\assertNodeEnd(), DumpTestCase\assertNodeStart(), DumpTestCase\assertTextNode(), and DumpTestCase\skipWhitespace().
Referenced by testPlain(), and testXmlDumpsBackupUseCaseLogging().
Definition at line 136 of file backup_LogTest.php.
References $dumper, $fname, $wgContLang, array(), DumpTestCase\assertDumpEnd(), DumpTestCase\assertDumpStart(), assertLogItem(), MediaWikiTestCase\getNewTempFile(), global, WikiExporter\LOGS, and WikiExporter\TEXT.
Definition at line 171 of file backup_LogTest.php.
References $dumper, $fname, $wgContLang, array(), DumpTestCase\assertDumpEnd(), DumpTestCase\assertDumpStart(), assertLogItem(), MediaWikiTestCase\checkHasGzip(), fail, MediaWikiTestCase\getNewTempFile(), global, DumpTestCase\gunzip(), WikiExporter\LOGS, and WikiExporter\TEXT.
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.