X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flogging%2FBlockLogFormatterTest.php;h=bc0ca2ad85cc77759293c8166005ce760cce3d44;hb=d98de9926d033b9eaa30306379dc1815ee27b42f;hp=85ccebc4ebdec490502b5a63c157e40344501d77;hpb=cb4d4c4d8f4884bfe18b1e69c0d1bc2d8d567d5c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/logging/BlockLogFormatterTest.php b/tests/phpunit/includes/logging/BlockLogFormatterTest.php index 85ccebc4eb..bc0ca2ad85 100644 --- a/tests/phpunit/includes/logging/BlockLogFormatterTest.php +++ b/tests/phpunit/includes/logging/BlockLogFormatterTest.php @@ -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', @@ -431,7 +502,7 @@ class BlockLogFormatterTest extends LogFormatterTestCase { ], ], [ - 'text' => 'Sysop blocked Logtestuser from non-editing actions' + 'text' => 'Sysop blocked Logtestuser from specified non-editing actions' . ' with an expiration time of indefinite (anonymous users only)', 'api' => [ 'duration' => 'infinite',