Revert "Factors out permissions check from User into PermissionManager service"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiEditPageTest.php
index a35613c..2045a13 100644 (file)
@@ -39,7 +39,6 @@ class ApiEditPageTest extends ApiTestCase {
                        $this->tablesUsed,
                        [ 'change_tag', 'change_tag_def', 'logging' ]
                );
-               $this->overrideMwServices();
        }
 
        public function testEdit() {
@@ -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',