MediaWiki  1.28.0
SanitizerValidateEmailTest Class Reference

Sanitizer::validateEmail. More...

Inheritance diagram for SanitizerValidateEmailTest:
Collaboration diagram for SanitizerValidateEmailTest:

Public Member Functions

 testEmailDoesNotNeedATopLevelDomain ()
 
 testEmailDomainCanNotBeginWithDot ()
 
 testEmailTopLevelDomainCanBeNumerical ()
 
 testEmailWellKnownUserAtHostDotTldAreValid ()
 
 testEmailWithAPlusInUserName ()
 
 testEmailWithCommasAreInvalids ()
 bug 26948 : 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

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

Definition at line 10 of file SanitizerValidateEmailTest.php.

References Sanitizer\validateEmail().

Referenced by invalid(), and valid().

SanitizerValidateEmailTest::testEmailDoesNotNeedATopLevelDomain ( )

Definition at line 47 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailDomainCanNotBeginWithDot ( )

Definition at line 79 of file SanitizerValidateEmailTest.php.

References invalid(), and valid().

SanitizerValidateEmailTest::testEmailTopLevelDomainCanBeNumerical ( )

Definition at line 92 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWellKnownUserAtHostDotTldAreValid ( )

Definition at line 30 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithAPlusInUserName ( )

Definition at line 42 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithCommasAreInvalids ( )

bug 26948 : comma were matched by an incorrect regexp range

Definition at line 69 of file SanitizerValidateEmailTest.php.

References invalid().

SanitizerValidateEmailTest::testEmailWithFunnyCharacters ( )

Definition at line 88 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithHyphens ( )

Definition at line 74 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithOneCharacterDomainIsValid ( )

Definition at line 100 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithoutAtSignIsInvalid ( )

Definition at line 96 of file SanitizerValidateEmailTest.php.

References invalid().

SanitizerValidateEmailTest::testEmailWithUpperCaseCharactersAreValid ( )

Definition at line 35 of file SanitizerValidateEmailTest.php.

References valid().

SanitizerValidateEmailTest::testEmailWithWhiteSpacesAreInvalids ( )

Definition at line 60 of file SanitizerValidateEmailTest.php.

References invalid().

SanitizerValidateEmailTest::testEmailWithWhiteSpacesBeforeOrAfterAreInvalids ( )

Definition at line 53 of file SanitizerValidateEmailTest.php.

References invalid().


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