MinervaNeue
A responsive mobile first skin
|
@group MinervaNeue @coversDefaultClass \MediaWiki\Minerva\Permissions\MinervaPagePermissions More...
Public Member Functions | |
testWatchAndEditNotAllowedOnMainPage () | |
@covers ::isAllowed | |
testInvalidPageActionsArentAllowed () | |
@covers ::isAllowed | |
testValidPageActionsAreAllowed () | |
@covers ::isAllowed | |
testEditPageAction ( $supportsDirectEditing, $supportsDirectApiEditing, $expected) | |
The "edit" page action is allowed when the page doesn't support direct editing via the API. | |
testPageActionsWhenOnUserPage () | |
@covers ::isAllowed | |
testPageActionsWhenOnAnonUserPage () | |
@covers ::isAllowed | |
testGlobalHideLanguageLinksTakesPrecedenceOnMainPage () | |
MediaWiki defines wgHideInterlanguageLinks which is default set to false, but some wikis can set this config to true. | |
testGlobalHideLanguageLinksTakesPrecedence () | |
MediaWiki defines wgHideInterlanguageLinks which is default set to false, but some wikis can set this config to true. | |
testSwitchLanguagePageAction ( $hasLanguagesOrVariants, $minervaAlwaysShowLanguageButton, $expected) | |
The "switch-language" page action is allowed when: v2 of the page action bar is enabled and if the page has interlanguage links or if the $wgMinervaAlwaysShowLanguageButton configuration variable is set to truthy. | |
testWatchIsAllowedOnlyWhenWatchlistPermissionsAreGranted () | |
Watch action requires 'viewmywatchlist' and 'editmywatchlist' permissions to be grated. | |
testCannotWatchNotWatchableTitle () | |
If Title is not watchable, it cannot be watched @covers ::isAllowed. | |
testMoveAndDeleteAndProtectNotAllowedByDefault () | |
@covers ::isAllowed | |
testMoveAndDeleteAndProtectAllowedForUserWithPermissions () | |
@covers ::isAllowed | |
Static Public Member Functions | |
static | editPageActionProvider () |
static | switchLanguagePageActionProvider () |
Protected Member Functions | |
setUp () | |
@group MinervaNeue @coversDefaultClass \MediaWiki\Minerva\Permissions\MinervaPagePermissions
MediaWiki\Minerva\MinervaPagePermissionsTest::testEditPageAction | ( | $supportsDirectEditing, | |
$supportsDirectApiEditing, | |||
$expected ) |
The "edit" page action is allowed when the page doesn't support direct editing via the API.
@dataProvider editPageActionProvider @covers ::isAllowed
MediaWiki\Minerva\MinervaPagePermissionsTest::testGlobalHideLanguageLinksTakesPrecedence | ( | ) |
MediaWiki defines wgHideInterlanguageLinks which is default set to false, but some wikis can set this config to true.
Minerva page permissions must respect that @covers ::isAllowed
MediaWiki\Minerva\MinervaPagePermissionsTest::testGlobalHideLanguageLinksTakesPrecedenceOnMainPage | ( | ) |
MediaWiki defines wgHideInterlanguageLinks which is default set to false, but some wikis can set this config to true.
Minerva page permissions must respect that @covers ::isAllowed
MediaWiki\Minerva\MinervaPagePermissionsTest::testSwitchLanguagePageAction | ( | $hasLanguagesOrVariants, | |
$minervaAlwaysShowLanguageButton, | |||
$expected ) |
The "switch-language" page action is allowed when: v2 of the page action bar is enabled and if the page has interlanguage links or if the $wgMinervaAlwaysShowLanguageButton
configuration variable is set to truthy.
@dataProvider switchLanguagePageActionProvider @covers ::isAllowed
MediaWiki\Minerva\MinervaPagePermissionsTest::testWatchIsAllowedOnlyWhenWatchlistPermissionsAreGranted | ( | ) |
Watch action requires 'viewmywatchlist' and 'editmywatchlist' permissions to be grated.
Verify that isAllowedAction('watch') returns false when user do not have those permissions granted @covers ::isAllowed