Skip to content
Snippets Groups Projects
Commit 45763179 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fixed email test case since we allow local addresses

parent a18f9d4a
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ class mail_isvalid extends UnitTestCase {
$tests[] = array('somebody@somewhere.museum',true);
$tests[] = array('somebody@somewhere.travel',true);
$tests[] = array('root@[2010:fb:fdac::311:2101]',true);
$tests[] = array('test@example', true); // we allow local addresses
// tests from http://code.google.com/p/php-email-address-validation/ below
......@@ -62,7 +63,6 @@ class mail_isvalid extends UnitTestCase {
$tests[] = array('test@.org', false);
$tests[] = array('12345678901234567890123456789012345678901234567890123456789012345@example.com', false); // 64 characters is maximum length for local part. This is 65.
$tests[] = array('test@123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012.com', false); // 255 characters is maximum length for domain. This is 256.
$tests[] = array('test@example', false);
$tests[] = array('test@[123.123.123.123', false);
$tests[] = array('test@123.123.123.123]', false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment