Add @covers tags to logging tests
[lhc/web/wiklou.git] / tests / phpunit / includes / logging / MoveLogFormatterTest.php
index fdc4b7e..ebda46b 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers MoveLogFormatter
+ */
 class MoveLogFormatterTest extends LogFormatterTestCase {
 
        /**
@@ -8,124 +11,124 @@ class MoveLogFormatterTest extends LogFormatterTestCase {
         * Do not change the existing data, just add a new database row
         */
        public static function provideMoveLogDatabaseRows() {
-               return array(
+               return [
                        // Current format - with redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move',
                                        'comment' => 'move comment with redirect',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                '4::target' => 'NewPage',
                                                '5::noredir' => '0',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'text' => 'User moved page OldPage to NewPage',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // Current format - without redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                '4::target' => 'NewPage',
                                                '5::noredir' => '1',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'text' => 'User moved page OldPage to NewPage without leaving a redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => true,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // legacy format - with redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
                                                '',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // legacy format - without redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
                                                '1',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage without leaving a redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => true,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // old format without flag for redirect suppression
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
-               );
+                                       ],
+                               ],
+                       ],
+               ];
        }
 
        /**
@@ -141,124 +144,124 @@ class MoveLogFormatterTest extends LogFormatterTestCase {
         * Do not change the existing data, just add a new database row
         */
        public static function provideMoveRedirLogDatabaseRows() {
-               return array(
+               return [
                        // Current format - with redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move_redir',
                                        'comment' => 'move comment with redirect',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                '4::target' => 'NewPage',
                                                '5::noredir' => '0',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'text' => 'User moved page OldPage to NewPage over redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // Current format - without redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move_redir',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                '4::target' => 'NewPage',
                                                '5::noredir' => '1',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'text' => 'User moved page OldPage to NewPage over a redirect without leaving a redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => true,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // legacy format - with redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move_redir',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
                                                '',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage over redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // legacy format - without redirect
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move_redir',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
                                                '1',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage over a redirect without leaving a redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => true,
-                                       ),
-                               ),
-                       ),
+                                       ],
+                               ],
+                       ],
 
                        // old format without flag for redirect suppression
-                       array(
-                               array(
+                       [
+                               [
                                        'type' => 'move',
                                        'action' => 'move_redir',
                                        'comment' => 'move comment',
                                        'namespace' => NS_MAIN,
                                        'title' => 'OldPage',
-                                       'params' => array(
+                                       'params' => [
                                                'NewPage',
-                                       ),
-                               ),
-                               array(
+                                       ],
+                               ],
+                               [
                                        'legacy' => true,
                                        'text' => 'User moved page OldPage to NewPage over redirect',
-                                       'api' => array(
+                                       'api' => [
                                                'target_ns' => 0,
                                                'target_title' => 'NewPage',
                                                'suppressredirect' => false,
-                                       ),
-                               ),
-                       ),
-               );
+                                       ],
+                               ],
+                       ],
+               ];
        }
 
        /**