Merge "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBlockTest.php
index b29d333..fe6fcfc 100644 (file)
@@ -150,8 +150,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'user' => [ 'applychangetags' => true ] ] );
 
-               $this->resetServices();
-
                $this->doBlock( [ 'tags' => 'custom tag' ] );
        }
 
@@ -162,7 +160,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->mergeMwGlobalArrayValue( 'wgGroupPermissions',
                        [ 'sysop' => $newPermissions ] );
 
-               $this->resetServices();
                $res = $this->doBlock( [ 'hidename' => '' ] );
 
                $dbw = wfGetDB( DB_MASTER );
@@ -185,7 +182,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( [
                        'wgEnableEmail' => true,
                        'wgEnableUserEmail' => true,
-                       'wgSysopEmailBans' => true,
                ] );
 
                $res = $this->doBlock( [ 'noemail' => '' ] );
@@ -203,7 +199,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( [
                        'wgEnableEmail' => true,
                        'wgEnableUserEmail' => true,
-                       'wgSysopEmailBans' => true,
                ] );
 
                $this->setExpectedException( ApiUsageException::class,
@@ -212,8 +207,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'sysop' => [ 'blockemail' => true ] ] );
 
-               $this->resetServices();
-
                $this->doBlock( [ 'noemail' => '' ] );
        }
 
@@ -265,6 +258,7 @@ class ApiBlockTest extends ApiTestCase {
                        'partial' => true,
                        'pagerestrictions' => $title,
                        'namespacerestrictions' => $namespace,
+                       'allowusertalk' => true,
                ] );
 
                $block = DatabaseBlock::newFromTarget( $this->mUser->getName() );