Page MenuHomePhabricator

phpunit failure: UserTest::testAllRightsWithMessage with some additional rights
Open, LowPublic

Description

Some "unexpected" rights:

+ 59 => 'flow-close'
+ 60 => 'flow-delete'
+ 61 => 'flow-edit-post'
+ 62 => 'flow-hide'
+ 63 => 'flow-suppress'
+ 64 => 'gwtoolset'
+ 95 => 'pagequality'
+ 123 => 'translate-sandboxaction'

Those four extensions probably forgot to set $wgAvailableRights per https://www.mediawiki.org/wiki/Manual:User_rights#Adding_new_rights ?


  1. UserTest::testAllRightsWithMessage

Each user rights (core/extensions) has a corresponding right- message.
Failed asserting that two arrays are equal.

  • Expected

+++ Actual
@@ @@

58 => 'ep-token'
  • 59 => 'hideuser'
  • 60 => 'import'
  • 61 => 'importupload'
  • 62 => 'interwiki'
  • 63 => 'ipblock-exempt'
  • 64 => 'lqt-merge'
  • 65 => 'lqt-react'
  • 66 => 'lqt-split'
  • 67 => 'markbotedits'
  • 68 => 'massmessage'
  • 69 => 'mergehistory'
  • 70 => 'mf-uploadbutton'
  • 71 => 'minoredit'
  • 72 => 'move'
  • 73 => 'move-categorypages'
  • 74 => 'move-rootuserpages'
  • 75 => 'move-subpages'
  • 76 => 'movefile'
  • 77 => 'mwoauthmanageconsumer'
  • 78 => 'mwoauthmanagemygrants'
  • 79 => 'mwoauthproposeconsumer'
  • 80 => 'mwoauthsuppress'
  • 81 => 'mwoauthupdateownconsumer'
  • 82 => 'mwoauthviewprivate'
  • 83 => 'mwoauthviewsuppressed'
  • 84 => 'nominornewtalk'
  • 85 => 'noratelimit'
  • 86 => 'override-antispoof'
  • 87 => 'override-export-depth'
  • 88 => 'pagelang'
  • 89 => 'pagetranslation'
  • 90 => 'passwordreset'
  • 91 => 'patrol'
  • 92 => 'patrolmarks'
  • 93 => 'protect'
  • 94 => 'proxyunbannable'
  • 95 => 'purge'
  • 96 => 'read'
  • 97 => 'renameuser'
  • 98 => 'reupload'
  • 99 => 'reupload-own'
  • 100 => 'reupload-shared'
  • 101 => 'rollback'
  • 102 => 'sendemail'
  • 103 => 'siteadmin'
  • 104 => 'skipcaptcha'
  • 105 => 'spamblacklistlog'
  • 106 => 'suppressionlog'
  • 107 => 'suppressredirect'
  • 108 => 'suppressrevision'
  • 109 => 'transcode-reset'
  • 110 => 'transcode-status'
  • 111 => 'translate'
  • 112 => 'translate-groupreview'
  • 113 => 'translate-import'
  • 114 => 'translate-manage'
  • 115 => 'translate-messagereview'
  • 116 => 'translate-sandboxmanage'
  • 117 => 'unblockself'
  • 118 => 'undelete'
  • 119 => 'unwatchedpages'
  • 120 => 'upload'
  • 121 => 'upload_by_url'
  • 122 => 'upwizcampaigns'
  • 123 => 'usermerge'
  • 124 => 'userrights'
  • 125 => 'userrights-interwiki'
  • 126 => 'viewmyprivateinfo'
  • 127 => 'viewmywatchlist'
  • 128 => 'viewsuppressed'
  • 129 => 'writeapi'

+ 59 => 'flow-close'
+ 60 => 'flow-delete'
+ 61 => 'flow-edit-post'
+ 62 => 'flow-hide'
+ 63 => 'flow-suppress'
+ 64 => 'gwtoolset'
+ 65 => 'hideuser'
+ 66 => 'import'
+ 67 => 'importupload'
+ 68 => 'interwiki'
+ 69 => 'ipblock-exempt'
+ 70 => 'lqt-merge'
+ 71 => 'lqt-react'
+ 72 => 'lqt-split'
+ 73 => 'markbotedits'
+ 74 => 'massmessage'
+ 75 => 'mergehistory'
+ 76 => 'mf-uploadbutton'
+ 77 => 'minoredit'
+ 78 => 'move'
+ 79 => 'move-categorypages'
+ 80 => 'move-rootuserpages'
+ 81 => 'move-subpages'
+ 82 => 'movefile'
+ 83 => 'mwoauthmanageconsumer'
+ 84 => 'mwoauthmanagemygrants'
+ 85 => 'mwoauthproposeconsumer'
+ 86 => 'mwoauthsuppress'
+ 87 => 'mwoauthupdateownconsumer'
+ 88 => 'mwoauthviewprivate'
+ 89 => 'mwoauthviewsuppressed'
+ 90 => 'nominornewtalk'
+ 91 => 'noratelimit'
+ 92 => 'override-antispoof'
+ 93 => 'override-export-depth'
+ 94 => 'pagelang'
+ 95 => 'pagequality'
+ 96 => 'pagetranslation'
+ 97 => 'passwordreset'
+ 98 => 'patrol'
+ 99 => 'patrolmarks'
+ 100 => 'protect'
+ 101 => 'proxyunbannable'
+ 102 => 'purge'
+ 103 => 'read'
+ 104 => 'renameuser'
+ 105 => 'reupload'
+ 106 => 'reupload-own'
+ 107 => 'reupload-shared'
+ 108 => 'rollback'
+ 109 => 'sendemail'
+ 110 => 'siteadmin'
+ 111 => 'skipcaptcha'
+ 112 => 'spamblacklistlog'
+ 113 => 'suppressionlog'
+ 114 => 'suppressredirect'
+ 115 => 'suppressrevision'
+ 116 => 'transcode-reset'
+ 117 => 'transcode-status'
+ 118 => 'translate'
+ 119 => 'translate-groupreview'
+ 120 => 'translate-import'
+ 121 => 'translate-manage'
+ 122 => 'translate-messagereview'
+ 123 => 'translate-sandboxaction'
+ 124 => 'translate-sandboxmanage'
+ 125 => 'unblockself'
+ 126 => 'undelete'
+ 127 => 'unwatchedpages'
+ 128 => 'upload'
+ 129 => 'upload_by_url'
+ 130 => 'upwizcampaigns'
+ 131 => 'usermerge'
+ 132 => 'userrights'
+ 133 => 'userrights-interwiki'
+ 134 => 'viewmyprivateinfo'
+ 135 => 'viewmywatchlist'
+ 136 => 'viewsuppressed'
+ 137 => 'writeapi'
)

/srv/vagrant/mediawiki/tests/phpunit/includes/UserTest.php:207
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133
/srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42
/srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160


Version: unspecified
Severity: normal

Details

Reference
bz68651

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:39 AM
bzimport set Reference to bz68651.
bzimport added a subscriber: Unknown Object (MLST).

Seems the test rely on default user preferences which extensions can adjust via hooks. To have this mw/core test to pass, we will need a way to differentiate between core preferences and extensions one.

If it is a message missing or a right unproperly setup. We need the test to be executed by the 'extension' test suite (or maybe 'structure' test suite since I think it is run for extensions as well). That will force extensions to correct their configuration.

Krinkle moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.Jul 7 2017, 5:13 AM