MediaWiki REL1_31
SanitizerValidateEmailTest Class Reference

Sanitizer::validateEmail. More...

Inheritance diagram for SanitizerValidateEmailTest:
Collaboration diagram for SanitizerValidateEmailTest:

Public Member Functions

 testEmailDoesNotNeedATopLevelDomain ()
 
 testEmailDomainCanNotBeginWithDot ()
 
 testEmailTopLevelDomainCanBeNumerical ()
 
 testEmailWellKnownUserAtHostDotTldAreValid ()
 
 testEmailWithAPlusInUserName ()
 
 testEmailWithCommasAreInvalids ()
 T28948 : comma were matched by an incorrect regexp range.
 
 testEmailWithFunnyCharacters ()
 
 testEmailWithHyphens ()
 
 testEmailWithOneCharacterDomainIsValid ()
 
 testEmailWithoutAtSignIsInvalid ()
 
 testEmailWithUpperCaseCharactersAreValid ()
 
 testEmailWithWhiteSpacesAreInvalids ()
 
 testEmailWithWhiteSpacesBeforeOrAfterAreInvalids ()
 

Private Member Functions

 checkEmail ( $addr, $expected=true, $msg='')
 
 invalid ( $addr, $msg='')
 
 valid ( $addr, $msg='')
 

Detailed Description

Sanitizer::validateEmail.

Todo
all test methods in this class should be refactored and... use a single test method and a single data provider...

Definition at line 8 of file SanitizerValidateEmailTest.php.

Member Function Documentation

◆ checkEmail()

SanitizerValidateEmailTest::checkEmail ( $addr,
$expected = true,
$msg = '' )
private

Definition at line 12 of file SanitizerValidateEmailTest.php.

Referenced by invalid(), and valid().

◆ invalid()

◆ testEmailDoesNotNeedATopLevelDomain()

SanitizerValidateEmailTest::testEmailDoesNotNeedATopLevelDomain ( )

Definition at line 49 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailDomainCanNotBeginWithDot()

SanitizerValidateEmailTest::testEmailDomainCanNotBeginWithDot ( )

Definition at line 81 of file SanitizerValidateEmailTest.php.

References invalid(), and valid().

◆ testEmailTopLevelDomainCanBeNumerical()

SanitizerValidateEmailTest::testEmailTopLevelDomainCanBeNumerical ( )

Definition at line 94 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWellKnownUserAtHostDotTldAreValid()

SanitizerValidateEmailTest::testEmailWellKnownUserAtHostDotTldAreValid ( )

Definition at line 32 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithAPlusInUserName()

SanitizerValidateEmailTest::testEmailWithAPlusInUserName ( )

Definition at line 44 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithCommasAreInvalids()

SanitizerValidateEmailTest::testEmailWithCommasAreInvalids ( )

T28948 : comma were matched by an incorrect regexp range.

Definition at line 71 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithFunnyCharacters()

SanitizerValidateEmailTest::testEmailWithFunnyCharacters ( )

Definition at line 90 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithHyphens()

SanitizerValidateEmailTest::testEmailWithHyphens ( )

Definition at line 76 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithOneCharacterDomainIsValid()

SanitizerValidateEmailTest::testEmailWithOneCharacterDomainIsValid ( )

Definition at line 102 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithoutAtSignIsInvalid()

SanitizerValidateEmailTest::testEmailWithoutAtSignIsInvalid ( )

Definition at line 98 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithUpperCaseCharactersAreValid()

SanitizerValidateEmailTest::testEmailWithUpperCaseCharactersAreValid ( )

Definition at line 37 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithWhiteSpacesAreInvalids()

SanitizerValidateEmailTest::testEmailWithWhiteSpacesAreInvalids ( )

Definition at line 62 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithWhiteSpacesBeforeOrAfterAreInvalids()

SanitizerValidateEmailTest::testEmailWithWhiteSpacesBeforeOrAfterAreInvalids ( )

Definition at line 55 of file SanitizerValidateEmailTest.php.

References invalid().

◆ valid()


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