$this->tablesUsed,
[ 'change_tag', 'change_tag_def', 'logging' ]
);
- $this->overrideMwServices();
}
public function testEdit() {
ChangeTags::defineTag( 'custom tag' );
$this->setMwGlobals( 'wgRevokePermissions',
[ 'user' => [ 'applychangetags' => true ] ] );
- // Supply services with updated globals
- $this->overrideMwServices();
-
try {
$this->doApiRequestWithToken( [
'action' => 'edit',
$this->setMwGlobals( 'wgRevokePermissions',
[ 'user' => [ 'upload' => true ] ] );
- // Supply services with updated globals
- $this->overrideMwServices();
$this->doApiRequestWithToken( [
'action' => 'edit',
'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 );
'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',
$this->setMwGlobals( 'wgRevokePermissions',
[ 'user' => [ 'editcontentmodel' => true ] ] );
- // Supply services with updated globals
- $this->overrideMwServices();
$this->doApiRequestWithToken( [
'action' => 'edit',