rdbms: Rename "memCache" to "memStash" in LBFactory
[mediawiki.git] / tests / phpunit / includes / logging / MergeLogFormatterTest.php
blob8b9abe42c125d7504bc71c76635d8faa19b0a4e0
1 <?php
3 class MergeLogFormatterTest extends LogFormatterTestCase {
5 /**
6 * Provide different rows from the logging table to test
7 * for backward compatibility.
8 * Do not change the existing data, just add a new database row
9 */
10 public static function provideMergeLogDatabaseRows() {
11 return [
12 // Current format
15 'type' => 'merge',
16 'action' => 'merge',
17 'comment' => 'Merge comment',
18 'namespace' => NS_MAIN,
19 'title' => 'OldPage',
20 'params' => [
21 '4::dest' => 'NewPage',
22 '5::mergepoint' => '20140804160710',
26 'text' => 'User merged OldPage into NewPage (revisions up to 16:07, 4 August 2014)',
27 'api' => [
28 'dest_ns' => 0,
29 'dest_title' => 'NewPage',
30 'mergepoint' => '2014-08-04T16:07:10Z',
35 // Legacy format
38 'type' => 'merge',
39 'action' => 'merge',
40 'comment' => 'merge comment',
41 'namespace' => NS_MAIN,
42 'title' => 'OldPage',
43 'params' => [
44 'NewPage',
45 '20140804160710',
49 'legacy' => true,
50 'text' => 'User merged OldPage into NewPage (revisions up to 16:07, 4 August 2014)',
51 'api' => [
52 'dest_ns' => 0,
53 'dest_title' => 'NewPage',
54 'mergepoint' => '2014-08-04T16:07:10Z',
61 /**
62 * @dataProvider provideMergeLogDatabaseRows
64 public function testMergeLogDatabaseRows( $row, $extra ) {
65 $this->doTestLogFormatter( $row, $extra );