Go to the documentation of this file.
10 private function checkEmail( $addr, $expected =
true, $msg =
'' ) {
12 $msg =
"Testing $addr";
22 private function valid( $addr, $msg =
'' ) {
26 private function invalid( $addr, $msg =
'' ) {
31 $this->
valid(
'user@example.com' );
32 $this->
valid(
'user@example.museum' );
36 $this->
valid(
'USER@example.com' );
37 $this->
valid(
'user@EXAMPLE.COM' );
38 $this->
valid(
'user@Example.com' );
39 $this->
valid(
'USER@eXAMPLE.com' );
43 $this->
valid(
'user+sub@example.com' );
44 $this->
valid(
'user+@example.com' );
48 $this->
valid(
"user@localhost" );
49 $this->
valid(
"FooBar@localdomain" );
50 $this->
valid(
"nobody@mycompany" );
54 $this->
invalid(
" user@host.com" );
55 $this->
invalid(
"user@host.com " );
56 $this->
invalid(
"\tuser@host.com" );
57 $this->
invalid(
"user@host.com\t" );
61 $this->
invalid(
"User user@host" );
62 $this->
invalid(
"first last@mycompany" );
63 $this->
invalid(
"firstlast@my company" );
70 $this->
invalid(
"user,foo@example.org" );
71 $this->
invalid(
"userfoo@ex,ample.org" );
75 $this->
valid(
"user-foo@example.org" );
76 $this->
valid(
"userfoo@ex-ample.org" );
81 $this->
invalid(
"user@.localdomain" );
82 $this->
invalid(
"user@localdomain." );
83 $this->
valid(
"user.@localdomain" );
84 $this->
valid(
".@localdomain" );
85 $this->
invalid(
".@a............" );
89 $this->
valid(
"\$user!ex{this}@123.com" );
93 $this->
valid(
"user@example.1234" );
97 $this->
invalid(
'userà example.com' );
101 $this->
valid(
'user@a' );
testEmailTopLevelDomainCanBeNumerical()
checkEmail( $addr, $expected=true, $msg='')
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
testEmailWithWhiteSpacesAreInvalids()
testEmailWithWhiteSpacesBeforeOrAfterAreInvalids()
testEmailWithOneCharacterDomainIsValid()
static validateEmail( $addr)
Does a string look like an e-mail address?
testEmailWellKnownUserAtHostDotTldAreValid()
testEmailDomainCanNotBeginWithDot()
@covers Sanitizer::validateEmail @TODO all test methods in this class should be refactored and....
testEmailWithUpperCaseCharactersAreValid()
testEmailWithFunnyCharacters()
testEmailWithAPlusInUserName()
testEmailWithoutAtSignIsInvalid()
testEmailWithCommasAreInvalids()
bug 26948 : comma were matched by an incorrect regexp range
testEmailDoesNotNeedATopLevelDomain()