Revert "Fix testsuites for LogFormatter"
[lhc/web/wiklou.git] / tests / phpunit / includes / logging / BlockLogFormatterTest.php
index 0041b9c..bc0ca2a 100644 (file)
@@ -401,7 +401,8 @@ class BlockLogFormatterTest extends LogFormatterTestCase {
                                        'api' => [
                                                'duration' => 'infinite',
                                                'flags' => [ 'anononly' ],
-                                               'restrictions' => [ 'pages' => [
+                                               'restrictions' => [
+                                                       'pages' => [
                                                                [
                                                                        'page_ns' => 2,
                                                                        'page_title' => 'User:Test1',
@@ -415,6 +416,76 @@ class BlockLogFormatterTest extends LogFormatterTestCase {
                                        ],
                                ],
                        ],
+                       [
+                               [
+                                       'type' => 'block',
+                                       'action' => 'block',
+                                       'comment' => 'Block comment',
+                                       'user' => 0,
+                                       'user_text' => 'Sysop',
+                                       'namespace' => NS_USER,
+                                       'title' => 'Logtestuser',
+                                       'params' => [
+                                               '5::duration' => 'infinite',
+                                               '6::flags' => 'anononly',
+                                               '7::restrictions' => [
+                                                       'namespaces' => [ NS_USER ],
+                                               ],
+                                               'sitewide' => false,
+                                       ],
+                               ],
+                               [
+                                       'text' => 'Sysop blocked Logtestuser from editing the namespace User'
+                                               . ' with an expiration time of indefinite (anonymous users only)',
+                                       'api' => [
+                                               'duration' => 'infinite',
+                                               'flags' => [ 'anononly' ],
+                                               'restrictions' => [
+                                                       'namespaces' => [ NS_USER ],
+                                               ],
+                                               'sitewide' => false,
+                                       ],
+                               ],
+                       ],
+                       [
+                               [
+                                       'type' => 'block',
+                                       'action' => 'block',
+                                       'comment' => 'Block comment',
+                                       'user' => 0,
+                                       'user_text' => 'Sysop',
+                                       'namespace' => NS_USER,
+                                       'title' => 'Logtestuser',
+                                       'params' => [
+                                               '5::duration' => 'infinite',
+                                               '6::flags' => 'anononly',
+                                               '7::restrictions' => [
+                                                       'pages' => [ 'Main Page' ],
+                                                       'namespaces' => [ NS_USER, NS_MAIN ],
+                                               ],
+                                               'sitewide' => false,
+                                       ],
+                               ],
+                               [
+                                       'text' => 'Sysop blocked Logtestuser from editing the page Main Page and the'
+                                               . ' namespaces User and (Main) with an expiration time of indefinite'
+                                               . ' (anonymous users only)',
+                                       'api' => [
+                                               'duration' => 'infinite',
+                                               'flags' => [ 'anononly' ],
+                                               'restrictions' => [
+                                                       'pages' => [
+                                                               [
+                                                                       'page_ns' => 0,
+                                                                       'page_title' => 'Main Page',
+                                                               ],
+                                                       ],
+                                                       'namespaces' => [ NS_USER, NS_MAIN ],
+                                               ],
+                                               'sitewide' => false,
+                                       ],
+                               ],
+                       ],
                        [
                                [
                                        'type' => 'block',