MediaWiki  master
DefaultPreferencesFactoryTest Class Reference

Preferences. More...

Inheritance diagram for DefaultPreferencesFactoryTest:
Collaboration diagram for DefaultPreferencesFactoryTest:

Public Member Functions

 emailAuthenticationProvider ()
 
 setUp ()
 
 testEmailAuthentication ( $user, $cssClass)
 CSS classes for emailauthentication preference field when there's no email. More...
 
 testGetForm ()
 MediaWiki\Preferences\DefaultPreferencesFactory::getForm() More...
 
 testIntvalFilter ()
 The rclimit preference should accept non-integer input and filter it to become an integer. More...
 
 testPreferencesFormPreSaveHookHasCorrectData ()
 Test that PreferencesFormPreSave hook has correct data: More...
 
 testShowRollbackConfIsHiddenForUsersWithoutRollbackRights ()
 MediaWiki\Preferences\DefaultPreferencesFactory::renderingPreferences() More...
 
 testShowRollbackConfIsShownForUsersWithRollbackRights ()
 MediaWiki\Preferences\DefaultPreferencesFactory::renderingPreferences() More...
 

Protected Member Functions

 getPreferencesFactory ()
 Get a basic PreferencesFactory for testing with. More...
 

Protected Attributes

Config $config
 
IContextSource $context
 

Detailed Description

Preferences.

Definition at line 31 of file DefaultPreferencesFactoryTest.php.

Member Function Documentation

◆ emailAuthenticationProvider()

DefaultPreferencesFactoryTest::emailAuthenticationProvider ( )

Definition at line 139 of file DefaultPreferencesFactoryTest.php.

References User, and wfTimestamp().

◆ getPreferencesFactory()

DefaultPreferencesFactoryTest::getPreferencesFactory ( )
protected

◆ setUp()

DefaultPreferencesFactoryTest::setUp ( )

Definition at line 39 of file DefaultPreferencesFactoryTest.php.

References $services, class, and Title\newFromText().

◆ testEmailAuthentication()

DefaultPreferencesFactoryTest::testEmailAuthentication (   $user,
  $cssClass 
)

CSS classes for emailauthentication preference field when there's no email.

See also
https://phabricator.wikimedia.org/T36302 MediaWiki\Preferences\DefaultPreferencesFactory::profilePreferences() emailAuthenticationProvider

Definition at line 89 of file DefaultPreferencesFactoryTest.php.

References $user, and getPreferencesFactory().

◆ testGetForm()

DefaultPreferencesFactoryTest::testGetForm ( )

MediaWiki\Preferences\DefaultPreferencesFactory::getForm()

Definition at line 74 of file DefaultPreferencesFactoryTest.php.

References $context, class, getPreferencesFactory(), and null.

◆ testIntvalFilter()

DefaultPreferencesFactoryTest::testIntvalFilter ( )

The rclimit preference should accept non-integer input and filter it to become an integer.

\MediaWiki\Preferences\DefaultPreferencesFactory::saveFormData

Definition at line 231 of file DefaultPreferencesFactoryTest.php.

References $user, getPreferencesFactory(), and User.

◆ testPreferencesFormPreSaveHookHasCorrectData()

DefaultPreferencesFactoryTest::testPreferencesFormPreSaveHookHasCorrectData ( )

Test that PreferencesFormPreSave hook has correct data:

  • user Object is passed
  • oldUserOptions contains previous user options (before save)
  • formData and User object have set up new properties
See also
https://phabricator.wikimedia.org/T169365 MediaWiki\Preferences\DefaultPreferencesFactory::submitForm()

Definition at line 162 of file DefaultPreferencesFactoryTest.php.

References $user, $value, as, class, getPreferencesFactory(), and use.

◆ testShowRollbackConfIsHiddenForUsersWithoutRollbackRights()

DefaultPreferencesFactoryTest::testShowRollbackConfIsHiddenForUsersWithoutRollbackRights ( )

MediaWiki\Preferences\DefaultPreferencesFactory::renderingPreferences()

Definition at line 98 of file DefaultPreferencesFactoryTest.php.

References class, and getPreferencesFactory().

◆ testShowRollbackConfIsShownForUsersWithRollbackRights()

DefaultPreferencesFactoryTest::testShowRollbackConfIsShownForUsersWithRollbackRights ( )

MediaWiki\Preferences\DefaultPreferencesFactory::renderingPreferences()

Definition at line 118 of file DefaultPreferencesFactoryTest.php.

References class, and getPreferencesFactory().

Member Data Documentation

◆ $config

Config DefaultPreferencesFactoryTest::$config
protected

Definition at line 37 of file DefaultPreferencesFactoryTest.php.

◆ $context

IContextSource DefaultPreferencesFactoryTest::$context
protected

Definition at line 34 of file DefaultPreferencesFactoryTest.php.

Referenced by testGetForm().


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