Merge "Add tests to ensure that retrieved actions match passed in restrictions"
[lhc/web/wiklou.git] / tests / phpunit / includes / TitlePermissionTest.php
index cac5d6b..3d8c643 100644 (file)
@@ -1029,6 +1029,13 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        $this->title->getUserPermissionsErrors( 'upload', $this->user ) );
                $this->assertEquals( [],
                        $this->title->getUserPermissionsErrors( 'purge', $this->user ) );
+
+               // Test no block.
+               $this->user->mBlockedby = null;
+               $this->user->mBlock = null;
+
+               $this->assertEquals( [],
+                       $this->title->getUserPermissionsErrors( 'edit', $this->user ) );
        }
 
        /**