Changeset 42343 for trunk/tests/phpunit/tests/formatting/IsEmail.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/IsEmail.php
r40667 r42343 7 7 function test_returns_the_email_address_if_it_is_valid() { 8 8 $data = array( 9 "bob@example.com",10 "phil@example.info",11 "ace@204.32.222.14",12 "kevin@many.subdomains.make.a.happy.man.edu",13 "a@b.co",14 9 'bob@example.com', 10 'phil@example.info', 11 'ace@204.32.222.14', 12 'kevin@many.subdomains.make.a.happy.man.edu', 13 'a@b.co', 14 ); 15 15 foreach ( $data as $datum ) { 16 16 $this->assertEquals( $datum, is_email( $datum ), $datum ); … … 20 20 function test_returns_false_if_given_an_invalid_email_address() { 21 21 $data = array( 22 "khaaaaaaaaaaaaaaan!",22 'khaaaaaaaaaaaaaaan!', 23 23 'http://bob.example.com/', 24 24 "sif i'd give u it, spamer!1", 25 "com.exampleNOSPAMbob",26 "bob@your mom",27 "a@b.c",28 29 foreach ( $data as $datum) {30 $this->assertFalse( is_email($datum), $datum);25 'com.exampleNOSPAMbob', 26 'bob@your mom', 27 'a@b.c', 28 ); 29 foreach ( $data as $datum ) { 30 $this->assertFalse( is_email( $datum ), $datum ); 31 31 } 32 32 }
Note: See TracChangeset
for help on using the changeset viewer.