Merge "rdbms: avoid LoadBalancer::getConnection waste when using $groups"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiEditPageTest.php
index a35613c..d2762e0 100644 (file)
@@ -39,7 +39,6 @@ class ApiEditPageTest extends ApiTestCase {
                        $this->tablesUsed,
                        [ 'change_tag', 'change_tag_def', 'logging' ]
                );
-               $this->overrideMwServices();
        }
 
        public function testEdit() {
@@ -411,10 +410,10 @@ class ApiEditPageTest extends ApiTestCase {
                $count++;
 
                /*
-               * T43990: if the target page has a newer revision than the redirect, then editing the
-               * redirect while specifying 'redirect' and *not* specifying 'basetimestamp' erroneously
-               * caused an edit conflict to be detected.
-               */
+                * T43990: if the target page has a newer revision than the redirect, then editing the
+                * redirect while specifying 'redirect' and *not* specifying 'basetimestamp' erroneously
+                * caused an edit conflict to be detected.
+                */
 
                // assume NS_HELP defaults to wikitext
                $name = "Help:ApiEditPageTest_testEditConflict_redirect_T43990_$count";
@@ -1368,9 +1367,6 @@ class ApiEditPageTest extends ApiTestCase {
                ChangeTags::defineTag( 'custom tag' );
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'user' => [ 'applychangetags' => true ] ] );
-               // Supply services with updated globals
-               $this->overrideMwServices();
-
                try {
                        $this->doApiRequestWithToken( [
                                'action' => 'edit',
@@ -1549,8 +1545,6 @@ class ApiEditPageTest extends ApiTestCase {
 
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'user' => [ 'upload' => true ] ] );
-               // Supply services with updated globals
-               $this->overrideMwServices();
 
                $this->doApiRequestWithToken( [
                        'action' => 'edit',
@@ -1566,8 +1560,6 @@ class ApiEditPageTest extends ApiTestCase {
                        'The content you supplied exceeds the article size limit of 1 kilobyte.' );
 
                $this->setMwGlobals( 'wgMaxArticleSize', 1 );
-               // Supply services with updated globals
-               $this->overrideMwServices();
 
                $text = str_repeat( '!', 1025 );
 
@@ -1585,8 +1577,6 @@ class ApiEditPageTest extends ApiTestCase {
                        'The action you have requested is limited to users in the group: ' );
 
                $this->setMwGlobals( 'wgRevokePermissions', [ '*' => [ 'edit' => true ] ] );
-               // Supply services with updated globals
-               $this->overrideMwServices();
 
                $this->doApiRequestWithToken( [
                        'action' => 'edit',
@@ -1603,8 +1593,6 @@ class ApiEditPageTest extends ApiTestCase {
 
                $this->setMwGlobals( 'wgRevokePermissions',
                        [ 'user' => [ 'editcontentmodel' => true ] ] );
-               // Supply services with updated globals
-               $this->overrideMwServices();
 
                $this->doApiRequestWithToken( [
                        'action' => 'edit',