public function testCanExecute() {
$user = $this->getTestUser()->getUser();
- $user->mRights = [ 'access' ];
+ $this->overrideUserPermissions( $user, 'access' );
$action = Action::factory( 'access', $this->getPage(), $this->getContext() );
$this->assertNull( $action->canExecute( $user ) );
}
public function testCanExecuteNoRight() {
$user = $this->getTestUser()->getUser();
- $user->mRights = [];
+ $this->overrideUserPermissions( $user, [] );
$action = Action::factory( 'access', $this->getPage(), $this->getContext() );
try {
public function testCanExecuteRequiresUnblock() {
$user = $this->getTestUser()->getUser();
- $user->mRights = [];
+ $this->overrideUserPermissions( $user, [] );
$page = $this->getExistingTestPage();
$action = Action::factory( 'unblock', $page, $this->getContext() );