Re-apply: Factors out permissions check from User into PermissionManager service
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index 43da9a9..b29d333 100644 (file)
@@ -150,6 +150,8 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'user' => [ 'applychangetags' => true ] ] );
 
+               $this->resetServices();
+
                $this->doBlock( [ 'tags' => 'custom tag' ] );
        }
 
@@ -160,6 +162,7 @@ class ApiBlockTest extends ApiTestCase {
                $this->mergeMwGlobalArrayValue( 'wgGroupPermissions',
                        [ 'sysop' => $newPermissions ] );
 
+               $this->resetServices();
                $res = $this->doBlock( [ 'hidename' => '' ] );
 
                $dbw = wfGetDB( DB_MASTER );
@@ -209,6 +212,8 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'sysop' => [ 'blockemail' => true ] ] );
 
+               $this->resetServices();
+
                $this->doBlock( [ 'noemail' => '' ] );
        }