4 * @covers \MergeLogFormatter
6 class MergeLogFormatterTest
extends LogFormatterTestCase
{
9 * Provide different rows from the logging table to test
10 * for backward compatibility.
11 * Do not change the existing data, just add a new database row
13 public static function provideMergeLogDatabaseRows() {
15 // Current format with a revid
20 'comment' => 'Merge comment',
21 'namespace' => NS_MAIN
,
24 '4::dest' => 'NewPage',
25 '5::mergepoint' => '20140804160710',
26 '6::mergerevid' => '1234'
30 'text' => 'User merged OldPage into NewPage (revisions up to 16:07, 4 August 2014)',
32 'mergerevid' => '1234',
34 'dest_title' => 'NewPage',
35 'mergepoint' => '2014-08-04T16:07:10Z',
39 // Same format without a revid
44 'comment' => 'Merge comment',
45 'namespace' => NS_MAIN
,
48 '4::dest' => 'NewPage',
49 '5::mergepoint' => '20140804160710',
53 'text' => 'User merged OldPage into NewPage (revisions up to 16:07, 4 August 2014)',
56 'dest_title' => 'NewPage',
57 'mergepoint' => '2014-08-04T16:07:10Z',
67 'comment' => 'merge comment',
68 'namespace' => NS_MAIN
,
77 'text' => 'User merged OldPage into NewPage (revisions up to 16:07, 4 August 2014)',
80 'dest_title' => 'NewPage',
81 'mergepoint' => '2014-08-04T16:07:10Z',
89 * @dataProvider provideMergeLogDatabaseRows
91 public function testMergeLogDatabaseRows( $row, $extra ) {
92 $this->doTestLogFormatter( $row, $extra );