3 class DeleteLogFormatterTest
extends LogFormatterTestCase
{
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
10 public static function provideDeleteLogDatabaseRows() {
17 'comment' => 'delete comment',
18 'namespace' => NS_MAIN
,
23 'text' => 'User deleted page Page',
33 'comment' => 'delete comment',
34 'namespace' => NS_MAIN
,
40 'text' => 'User deleted page Page',
48 * @dataProvider provideDeleteLogDatabaseRows
50 public function testDeleteLogDatabaseRows( $row, $extra ) {
51 $this->doTestLogFormatter( $row, $extra );
55 * Provide different rows from the logging table to test
56 * for backward compatibility.
57 * Do not change the existing data, just add a new database row
59 public static function provideRestoreLogDatabaseRows() {
65 'action' => 'restore',
66 'comment' => 'delete comment',
67 'namespace' => NS_MAIN
,
72 'text' => 'User restored page Page',
81 'action' => 'restore',
82 'comment' => 'delete comment',
83 'namespace' => NS_MAIN
,
89 'text' => 'User restored page Page',
97 * @dataProvider provideRestoreLogDatabaseRows
99 public function testRestoreLogDatabaseRows( $row, $extra ) {
100 $this->doTestLogFormatter( $row, $extra );
104 * Provide different rows from the logging table to test
105 * for backward compatibility.
106 * Do not change the existing data, just add a new database row
108 public static function provideRevisionLogDatabaseRows() {
114 'action' => 'revision',
115 'comment' => 'delete comment',
116 'namespace' => NS_MAIN
,
119 '4::type' => 'archive',
120 '5::ids' => [ '1', '3', '4' ],
126 'text' => 'User changed visibility of 3 revisions on page Page: edit summary '
127 . 'hidden and content unhidden',
130 'ids' => [ '1', '3', '4' ],
136 'restricted' => false,
143 'restricted' => false,
153 'action' => 'revision',
154 'comment' => 'delete comment',
155 'namespace' => NS_MAIN
,
166 'text' => 'User changed visibility of 3 revisions on page Page: edit summary '
167 . 'hidden and content unhidden',
170 'ids' => [ '1', '3', '4' ],
176 'restricted' => false,
183 'restricted' => false,
192 * @dataProvider provideRevisionLogDatabaseRows
194 public function testRevisionLogDatabaseRows( $row, $extra ) {
195 $this->doTestLogFormatter( $row, $extra );
199 * Provide different rows from the logging table to test
200 * for backward compatibility.
201 * Do not change the existing data, just add a new database row
203 public static function provideEventLogDatabaseRows() {
210 'comment' => 'delete comment',
211 'namespace' => NS_MAIN
,
214 '4::ids' => [ '1', '3', '4' ],
220 'text' => 'User changed visibility of 3 log events on Page: edit summary hidden '
221 . 'and content unhidden',
224 'ids' => [ '1', '3', '4' ],
230 'restricted' => false,
237 'restricted' => false,
248 'comment' => 'delete comment',
249 'namespace' => NS_MAIN
,
259 'text' => 'User changed visibility of 3 log events on Page: edit summary hidden '
260 . 'and content unhidden',
263 'ids' => [ '1', '3', '4' ],
269 'restricted' => false,
276 'restricted' => false,
285 * @dataProvider provideEventLogDatabaseRows
287 public function testEventLogDatabaseRows( $row, $extra ) {
288 $this->doTestLogFormatter( $row, $extra );
292 * Provide different rows from the logging table to test
293 * for backward compatibility.
294 * Do not change the existing data, just add a new database row
296 public static function provideSuppressRevisionLogDatabaseRows() {
301 'type' => 'suppress',
302 'action' => 'revision',
303 'comment' => 'Suppress comment',
304 'namespace' => NS_MAIN
,
307 '4::type' => 'archive',
308 '5::ids' => [ '1', '3', '4' ],
314 'text' => 'User secretly changed visibility of 3 revisions on page Page: edit '
315 . 'summary hidden, content unhidden and applied restrictions to administrators',
318 'ids' => [ '1', '3', '4' ],
324 'restricted' => false,
331 'restricted' => true,
340 'type' => 'suppress',
341 'action' => 'revision',
342 'comment' => 'Suppress comment',
343 'namespace' => NS_MAIN
,
354 'text' => 'User secretly changed visibility of 3 revisions on page Page: edit '
355 . 'summary hidden, content unhidden and applied restrictions to administrators',
358 'ids' => [ '1', '3', '4' ],
364 'restricted' => false,
371 'restricted' => true,
380 * @dataProvider provideSuppressRevisionLogDatabaseRows
382 public function testSuppressRevisionLogDatabaseRows( $row, $extra ) {
383 $this->doTestLogFormatter( $row, $extra );
387 * Provide different rows from the logging table to test
388 * for backward compatibility.
389 * Do not change the existing data, just add a new database row
391 public static function provideSuppressEventLogDatabaseRows() {
396 'type' => 'suppress',
398 'comment' => 'Suppress comment',
399 'namespace' => NS_MAIN
,
402 '4::ids' => [ '1', '3', '4' ],
408 'text' => 'User secretly changed visibility of 3 log events on Page: edit '
409 . 'summary hidden, content unhidden and applied restrictions to administrators',
412 'ids' => [ '1', '3', '4' ],
418 'restricted' => false,
425 'restricted' => true,
434 'type' => 'suppress',
436 'comment' => 'Suppress comment',
437 'namespace' => NS_MAIN
,
447 'text' => 'User secretly changed visibility of 3 log events on Page: edit '
448 . 'summary hidden, content unhidden and applied restrictions to administrators',
451 'ids' => [ '1', '3', '4' ],
457 'restricted' => false,
464 'restricted' => true,
473 * @dataProvider provideSuppressEventLogDatabaseRows
475 public function testSuppressEventLogDatabaseRows( $row, $extra ) {
476 $this->doTestLogFormatter( $row, $extra );
480 * Provide different rows from the logging table to test
481 * for backward compatibility.
482 * Do not change the existing data, just add a new database row
484 public static function provideSuppressDeleteLogDatabaseRows() {
489 'type' => 'suppress',
490 'action' => 'delete',
491 'comment' => 'delete comment',
492 'namespace' => NS_MAIN
,
497 'text' => 'User suppressed page Page',
505 'type' => 'suppress',
506 'action' => 'delete',
507 'comment' => 'delete comment',
508 'namespace' => NS_MAIN
,
514 'text' => 'User suppressed page Page',
522 * @dataProvider provideSuppressDeleteLogDatabaseRows
524 public function testSuppressDeleteLogDatabaseRows( $row, $extra ) {
525 $this->doTestLogFormatter( $row, $extra );