MediaWiki  master
TitlePermissionTest Class Reference

Database. More...

Inheritance diagram for TitlePermissionTest:
Collaboration diagram for TitlePermissionTest:

Public Member Functions

 testActionPermissions ()
 
 testCascadingSourcesRestrictions ()
 \MediaWiki\Permissions\PermissionManager::checkCascadingSourcesRestrictions More...
 
 testCssConfigEditPermissions ()
 
 testJsConfigEditPermissions ()
 
 testJsonConfigEditPermissions ()
 
 testOtherCssConfigEditPermissions ()
 
 testOtherJsConfigEditPermissions ()
 
 testOtherJsonConfigEditPermissions ()
 
 testOtherNonConfigEditPermissions ()
 
 testPageRestrictions ()
 
 testPatrolActionConfigEditPermissions ()
 
 testQuickPermissions ()
 
 testSpecialsAndNSPermissions ()
 
 testUserBlock ()
 \MediaWiki\Permissions\PermissionManager::checkUserBlock More...
 
 testUserBlockAction ()
 \MediaWiki\Permissions\PermissionManager::checkUserBlock More...
 

Public Attributes

User $altUser
 
string $altUserName
 
User $anonUser
 
User $userUser
 

Protected Member Functions

 runConfigEditPermissions ( $resultNone, $resultMyCss, $resultMyJson, $resultMyJs, $resultUserCss, $resultUserJson, $resultUserJs, $resultPatrol)
 
 runGroupPermissions ( $action, $result, $result2=null)
 
 setTitle ( $ns, $title="Main_Page")
 
 setUp ()
 
 setUser ( $userName=null)
 
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 

Protected Attributes

Title $title
 
User $user
 
string $userName
 

Detailed Description

Database.

\MediaWiki\Permissions\PermissionManager::getPermissionErrors \MediaWiki\Permissions\PermissionManager::getPermissionErrorsInternal

Definition at line 14 of file TitlePermissionTest.php.

Member Function Documentation

◆ runConfigEditPermissions()

TitlePermissionTest::runConfigEditPermissions (   $resultNone,
  $resultMyCss,
  $resultMyJson,
  $resultMyJs,
  $resultUserCss,
  $resultUserJson,
  $resultUserJs,
  $resultPatrol 
)
protected

◆ runGroupPermissions()

TitlePermissionTest::runGroupPermissions (   $action,
  $result,
  $result2 = null 
)
protected

Definition at line 363 of file TitlePermissionTest.php.

References $res, $wgGroupPermissions, null, title, and user.

Referenced by testQuickPermissions().

◆ setTitle()

◆ setUp()

TitlePermissionTest::setUp ( )
protected

◆ setUser()

◆ testActionPermissions()

TitlePermissionTest::testActionPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkActionPermissions

Definition at line 828 of file TitlePermissionTest.php.

References NS_HELP, NS_MAIN, NS_MEDIA, setTitle(), title, and user.

◆ testCascadingSourcesRestrictions()

TitlePermissionTest::testCascadingSourcesRestrictions ( )

\MediaWiki\Permissions\PermissionManager::checkCascadingSourcesRestrictions

Definition at line 797 of file TitlePermissionTest.php.

References Title\makeTitle(), NS_MAIN, setTitle(), title, and user.

◆ testCssConfigEditPermissions()

TitlePermissionTest::testCssConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 517 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testJsConfigEditPermissions()

TitlePermissionTest::testJsConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 469 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testJsonConfigEditPermissions()

TitlePermissionTest::testJsonConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 492 of file TitlePermissionTest.php.

References NS_PROJECT, NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testOtherCssConfigEditPermissions()

TitlePermissionTest::testOtherCssConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 586 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testOtherJsConfigEditPermissions()

TitlePermissionTest::testOtherJsConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 540 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testOtherJsonConfigEditPermissions()

TitlePermissionTest::testOtherJsonConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 563 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testOtherNonConfigEditPermissions()

TitlePermissionTest::testOtherNonConfigEditPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 609 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testPageRestrictions()

TitlePermissionTest::testPageRestrictions ( )
Todo:
This test method should be split up into separate test methods and data providers

This test is failing per T201776.

Broken \MediaWiki\Permissions\PermissionManager::checkPageRestrictions

Definition at line 704 of file TitlePermissionTest.php.

References NS_MAIN, NS_PROJECT, setTitle(), title, and user.

◆ testPatrolActionConfigEditPermissions()

TitlePermissionTest::testPatrolActionConfigEditPermissions ( )
Todo:
This should use data providers like the other methods here.

\MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions

Definition at line 631 of file TitlePermissionTest.php.

References NS_USER, runConfigEditPermissions(), setTitle(), and setUser().

◆ testQuickPermissions()

TitlePermissionTest::testQuickPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers

This test is failing per T201776.

Broken \MediaWiki\Permissions\PermissionManager::checkQuickPermissions

Definition at line 101 of file TitlePermissionTest.php.

References $res, $wgGroupPermissions, as, false, NS_FILE, NS_MAIN, NS_PROJECT, NS_TALK, NS_USER, runGroupPermissions(), setTitle(), setUser(), title, true, and user.

◆ testSpecialsAndNSPermissions()

TitlePermissionTest::testSpecialsAndNSPermissions ( )
Todo:
This test method should be split up into separate test methods and data providers \MediaWiki\Permissions\PermissionManager::checkSpecialsAndNSPermissions

Definition at line 412 of file TitlePermissionTest.php.

References $wgNamespaceProtection, NS_MAIN, NS_MEDIAWIKI, NS_SPECIAL, NS_USER, null, setTitle(), setUser(), title, and user.

◆ testUserBlock()

TitlePermissionTest::testUserBlock ( )

\MediaWiki\Permissions\PermissionManager::checkUserBlock

Definition at line 902 of file TitlePermissionTest.php.

References $wgLang, $wgLocalTZoffset, NS_HELP, null, setTitle(), title, user, and wfTimestamp().

◆ testUserBlockAction()

TitlePermissionTest::testUserBlockAction ( )

\MediaWiki\Permissions\PermissionManager::checkUserBlock

Tests to determine that the passed in permission does not get mixed up with an action of the same name.

Definition at line 1068 of file TitlePermissionTest.php.

References $wgLang, class, null, title, user, and wfTimestamp().

Member Data Documentation

◆ $altUser

User TitlePermissionTest::$altUser

Definition at line 29 of file TitlePermissionTest.php.

Referenced by setUser().

◆ $altUserName

string TitlePermissionTest::$altUserName

Definition at line 19 of file TitlePermissionTest.php.

◆ $anonUser

User TitlePermissionTest::$anonUser

Definition at line 29 of file TitlePermissionTest.php.

Referenced by setUser().

◆ $title

Title TitlePermissionTest::$title
protected

Definition at line 24 of file TitlePermissionTest.php.

◆ $user

User TitlePermissionTest::$user
protected

Definition at line 29 of file TitlePermissionTest.php.

◆ $userName

string TitlePermissionTest::$userName
protected

Definition at line 19 of file TitlePermissionTest.php.

◆ $userUser

User TitlePermissionTest::$userUser

Definition at line 29 of file TitlePermissionTest.php.

Referenced by setUp(), and setUser().


The documentation for this class was generated from the following file: