MediaWiki REL1_34
CaptchaTest Class Reference

@covers SimpleCaptcha More...

Inheritance diagram for CaptchaTest:
Collaboration diagram for CaptchaTest:

Public Member Functions

 provideAttributeOverwritten ()
 
 provideAttributeSet ()
 
 provideCanSkipCaptchaIPWhitelisted ()
 
 provideCanSkipCaptchaMailconfirmed ()
 
 provideCanSkipCaptchaUserright ()
 
 provideNamespaceOverwrites ()
 
 provideSimpleTriggersCaptcha ()
 
 tearDown ()
 
 testCanSkipCaptchaIPWhitelisted ( $requestIP, $IPWhitelist, $expected)
 
 testCanSkipCaptchaMailconfirmed ( $allowUserConfirmEmail, $userIsMailConfirmed, $expected)
 
 testCanSkipCaptchaUserright ( $userIsAllowed, $expected)
 @dataProvider provideCanSkipCaptchaUserright
 
 testCaptchaTriggersAttributeGetsOverwritten ( $trigger, $expected)
 @dataProvider provideAttributeOverwritten
 
 testCaptchaTriggersAttributeSetTrue ( $trigger, $value)
 @dataProvider provideAttributeSet
 
 testNamespaceTriggersOverwrite ( $trigger, $expected)
 @dataProvider provideNamespaceOverwrites
 
 testTriggersCaptcha ( $action, $expectedResult)
 @dataProvider provideSimpleTriggersCaptcha
 

Private Member Functions

 setCaptchaTriggersAttribute ( $trigger, $value)
 

Private Attributes

ScopedCallback[] $hold = []
 

Detailed Description

@covers SimpleCaptcha

Definition at line 9 of file CaptchaTest.php.

Member Function Documentation

◆ provideAttributeOverwritten()

CaptchaTest::provideAttributeOverwritten ( )

Definition at line 130 of file CaptchaTest.php.

References true.

◆ provideAttributeSet()

CaptchaTest::provideAttributeSet ( )

Definition at line 109 of file CaptchaTest.php.

References true.

◆ provideCanSkipCaptchaIPWhitelisted()

CaptchaTest::provideCanSkipCaptchaIPWhitelisted ( )

Definition at line 209 of file CaptchaTest.php.

◆ provideCanSkipCaptchaMailconfirmed()

CaptchaTest::provideCanSkipCaptchaMailconfirmed ( )

Definition at line 177 of file CaptchaTest.php.

References true.

◆ provideCanSkipCaptchaUserright()

CaptchaTest::provideCanSkipCaptchaUserright ( )

Definition at line 150 of file CaptchaTest.php.

References true.

◆ provideNamespaceOverwrites()

CaptchaTest::provideNamespaceOverwrites ( )

Definition at line 63 of file CaptchaTest.php.

References true.

◆ provideSimpleTriggersCaptcha()

CaptchaTest::provideSimpleTriggersCaptcha ( )

Definition at line 33 of file CaptchaTest.php.

References true.

◆ setCaptchaTriggersAttribute()

CaptchaTest::setCaptchaTriggersAttribute ( $trigger,
$value )
private

◆ tearDown()

CaptchaTest::tearDown ( )

Definition at line 14 of file CaptchaTest.php.

◆ testCanSkipCaptchaIPWhitelisted()

CaptchaTest::testCanSkipCaptchaIPWhitelisted ( $requestIP,
$IPWhitelist,
$expected )
Parameters
$requestIP
$IPWhitelist
$expected
Exceptions
ConfigException@dataProvider provideCanSkipCaptchaIPWhitelisted

Definition at line 193 of file CaptchaTest.php.

References getUser().

◆ testCanSkipCaptchaMailconfirmed()

CaptchaTest::testCanSkipCaptchaMailconfirmed ( $allowUserConfirmEmail,
$userIsMailConfirmed,
$expected )
Parameters
$allowUserConfirmEmail
$userIsMailConfirmed
$expected
Exceptions
ConfigException@dataProvider provideCanSkipCaptchaMailconfirmed

Definition at line 164 of file CaptchaTest.php.

◆ testCanSkipCaptchaUserright()

CaptchaTest::testCanSkipCaptchaUserright ( $userIsAllowed,
$expected )

@dataProvider provideCanSkipCaptchaUserright

Definition at line 140 of file CaptchaTest.php.

◆ testCaptchaTriggersAttributeGetsOverwritten()

CaptchaTest::testCaptchaTriggersAttributeGetsOverwritten ( $trigger,
$expected )

@dataProvider provideAttributeOverwritten

Definition at line 119 of file CaptchaTest.php.

References setCaptchaTriggersAttribute().

◆ testCaptchaTriggersAttributeSetTrue()

CaptchaTest::testCaptchaTriggersAttributeSetTrue ( $trigger,
$value )

@dataProvider provideAttributeSet

Definition at line 103 of file CaptchaTest.php.

References setCaptchaTriggersAttribute().

◆ testNamespaceTriggersOverwrite()

CaptchaTest::testNamespaceTriggersOverwrite ( $trigger,
$expected )

@dataProvider provideNamespaceOverwrites

Definition at line 47 of file CaptchaTest.php.

References $title.

◆ testTriggersCaptcha()

CaptchaTest::testTriggersCaptcha ( $action,
$expectedResult )

@dataProvider provideSimpleTriggersCaptcha

Definition at line 23 of file CaptchaTest.php.

Member Data Documentation

◆ $hold

ScopedCallback [] CaptchaTest::$hold = []
private

Definition at line 12 of file CaptchaTest.php.


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