MediaWiki  master
PasswordTestCase Class Reference
Inheritance diagram for PasswordTestCase:
Collaboration diagram for PasswordTestCase:

Public Member Functions

 provideTypes ( $type)
 
 testCrypt ( $type)
 provideTypes More...
 
 testHashing ( $shouldMatch, $hash, $password)
 providePasswordTests More...
 
 testInvalidUnequalNormal ( $shouldMatch, $hash, $password)
 providePasswordTests InvalidPassword More...
 
 testStringSerialization ( $shouldMatch, $hash, $password)
 providePasswordTests More...
 

Static Public Member Functions

static providePasswordTests ()
 An array of tests in the form of (bool, string, string), where the first element is whether the second parameter (a password hash) and the third parameter (a password) should match. More...
 

Protected Member Functions

 getTypeConfigs ()
 Return an array of configs to be used for this class's password type. More...
 
 getValidTypes ()
 
 setUp ()
 

Protected Attributes

PasswordFactory $passwordFactory
 

Detailed Description

Since
1.24

Definition at line 26 of file PasswordTestCase.php.

Member Function Documentation

◆ getTypeConfigs()

PasswordTestCase::getTypeConfigs ( )
abstractprotected

Return an array of configs to be used for this class's password type.

Returns
array[]

Referenced by getValidTypes(), and setUp().

◆ getValidTypes()

PasswordTestCase::getValidTypes ( )
protected

Definition at line 88 of file PasswordTestCase.php.

References getTypeConfigs().

Referenced by provideTypes().

◆ providePasswordTests()

static PasswordTestCase::providePasswordTests ( )
static

An array of tests in the form of (bool, string, string), where the first element is whether the second parameter (a password hash) and the third parameter (a password) should match.

Returns
array
Exceptions
MWException

Definition at line 55 of file PasswordTestCase.php.

◆ provideTypes()

PasswordTestCase::provideTypes (   $type)

Definition at line 92 of file PasswordTestCase.php.

References $params, $type, as, and getValidTypes().

◆ setUp()

PasswordTestCase::setUp ( )
protected

Definition at line 32 of file PasswordTestCase.php.

References $type, as, and getTypeConfigs().

◆ testCrypt()

PasswordTestCase::testCrypt (   $type)

provideTypes

Definition at line 103 of file PasswordTestCase.php.

References $type.

◆ testHashing()

PasswordTestCase::testHashing (   $shouldMatch,
  $hash,
  $password 
)

providePasswordTests

Definition at line 62 of file PasswordTestCase.php.

◆ testInvalidUnequalNormal()

PasswordTestCase::testInvalidUnequalNormal (   $shouldMatch,
  $hash,
  $password 
)

providePasswordTests InvalidPassword

Definition at line 81 of file PasswordTestCase.php.

References null.

◆ testStringSerialization()

PasswordTestCase::testStringSerialization (   $shouldMatch,
  $hash,
  $password 
)

providePasswordTests

Definition at line 70 of file PasswordTestCase.php.

References $serialized.

Member Data Documentation

◆ $passwordFactory

PasswordFactory PasswordTestCase::$passwordFactory
protected

Definition at line 30 of file PasswordTestCase.php.


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