MediaWiki  1.30.0
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. More...
 
 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 10 of file SanitizerValidateEmailTest.php.

Referenced by invalid(), and valid().

◆ invalid()

◆ testEmailDoesNotNeedATopLevelDomain()

SanitizerValidateEmailTest::testEmailDoesNotNeedATopLevelDomain ( )

Definition at line 47 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailDomainCanNotBeginWithDot()

SanitizerValidateEmailTest::testEmailDomainCanNotBeginWithDot ( )

Definition at line 79 of file SanitizerValidateEmailTest.php.

References invalid(), and valid().

◆ testEmailTopLevelDomainCanBeNumerical()

SanitizerValidateEmailTest::testEmailTopLevelDomainCanBeNumerical ( )

Definition at line 92 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWellKnownUserAtHostDotTldAreValid()

SanitizerValidateEmailTest::testEmailWellKnownUserAtHostDotTldAreValid ( )

Definition at line 30 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithAPlusInUserName()

SanitizerValidateEmailTest::testEmailWithAPlusInUserName ( )

Definition at line 42 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithCommasAreInvalids()

SanitizerValidateEmailTest::testEmailWithCommasAreInvalids ( )

T28948 : comma were matched by an incorrect regexp range.

Definition at line 69 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithFunnyCharacters()

SanitizerValidateEmailTest::testEmailWithFunnyCharacters ( )

Definition at line 88 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithHyphens()

SanitizerValidateEmailTest::testEmailWithHyphens ( )

Definition at line 74 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithOneCharacterDomainIsValid()

SanitizerValidateEmailTest::testEmailWithOneCharacterDomainIsValid ( )

Definition at line 100 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithoutAtSignIsInvalid()

SanitizerValidateEmailTest::testEmailWithoutAtSignIsInvalid ( )

Definition at line 96 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithUpperCaseCharactersAreValid()

SanitizerValidateEmailTest::testEmailWithUpperCaseCharactersAreValid ( )

Definition at line 35 of file SanitizerValidateEmailTest.php.

References valid().

◆ testEmailWithWhiteSpacesAreInvalids()

SanitizerValidateEmailTest::testEmailWithWhiteSpacesAreInvalids ( )

Definition at line 60 of file SanitizerValidateEmailTest.php.

References invalid().

◆ testEmailWithWhiteSpacesBeforeOrAfterAreInvalids()

SanitizerValidateEmailTest::testEmailWithWhiteSpacesBeforeOrAfterAreInvalids ( )

Definition at line 53 of file SanitizerValidateEmailTest.php.

References invalid().

◆ valid()


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