This might avoid confusion when testing. Currently, an email without
a tld is invalid (ex user@host). The assertions could have been
invalid just by the lack of tld, not the spaces!
$this->valid( 'user+@example.com' );
}
function testEmailWithWhiteSpacesBeforeOrAfterAreInvalids() {
- $this->invalid( " user@host" );
- $this->invalid( "user@host " );
- $this->invalid( "\tuser@host" );
- $this->invalid( "user@host\t" );
+ $this->invalid( " user@host.com" );
+ $this->invalid( "user@host.com " );
+ $this->invalid( "\tuser@host.com" );
+ $this->invalid( "user@host.com\t" );
}
function testEmailWithWhiteSpacesAreInvalids() {
$this->invalid( "User user@host" );