Changeset 32638
- Timestamp:
- 05/28/2015 04:05:30 PM (9 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite.php
r29916 r32638 37 37 $this->assertEquals( $user->user_email, $reg_blog[ count( $reg_blog )-1 ] ); 38 38 } 39 40 /**41 * @ticket 2157042 */43 function test_aggressiveness_of_is_email_address_unsafe() {44 update_site_option( 'banned_email_domains', array( 'bar.com', 'foo.co' ) );45 46 foreach ( array( 'test@bar.com', 'test@foo.bar.com', 'test@foo.co', 'test@subdomain.foo.co' ) as $email_address ) {47 $this->assertTrue( is_email_address_unsafe( $email_address ), "$email_address should be UNSAFE" );48 }49 50 foreach ( array( 'test@foobar.com', 'test@foo-bar.com', 'test@foo.com', 'test@subdomain.foo.com' ) as $email_address ) {51 $this->assertFalse( is_email_address_unsafe( $email_address ), "$email_address should be SAFE" );52 }53 }54 55 /**56 * @ticket 2504657 */58 function test_case_sensitivity_of_is_email_address_unsafe() {59 update_site_option( 'banned_email_domains', array( 'baR.com', 'Foo.co', 'barfoo.COM', 'BAZ.com' ) );60 61 foreach ( array( 'test@Bar.com', 'tEst@bar.com', 'test@barFoo.com', 'tEst@foo.bar.com', 'test@baz.Com' ) as $email_address ) {62 $this->assertTrue( is_email_address_unsafe( $email_address ), "$email_address should be UNSAFE" );63 }64 65 foreach ( array( 'test@Foobar.com', 'test@Foo-bar.com', 'tEst@foobar.com', 'test@Subdomain.Foo.com', 'test@fooBAz.com' ) as $email_address ) {66 $this->assertFalse( is_email_address_unsafe( $email_address ), "$email_address should be SAFE" );67 }68 69 }70 39 } 71 40
Note: See TracChangeset
for help on using the changeset viewer.