WordPress.org

Make WordPress Core

Changeset 1007 in tests


Ignore:
Timestamp:
09/04/12 10:16:34 (20 months ago)
Author:
westi
Message:

Multisite: First set of tests for is_email_address_unsafe from #WP21570 props mdawaffe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ms.php

    r992 r1007  
    421421        restore_current_blog(); 
    422422    } 
     423 
     424    /** 
     425     * @ticket 21570 
     426     */ 
     427    function test_is_email_address_unsafe() { 
     428        update_site_option( 'banned_email_domains', 'bar.com' ); 
     429 
     430        foreach ( array( 'test@bar.com', 'test@foo.bar.com' ) as $email_address ) { 
     431            $this->assertTrue( is_email_address_unsafe( $email_address ), "$email_address should be UNSAFE" ); 
     432        } 
     433 
     434        foreach ( array( 'test@foobar.com', 'test@foo-bar.com' ) as $email_address ) { 
     435            $this->assertFalse( is_email_address_unsafe( $email_address ), "$email_address should be SAFE" ); 
     436        } 
     437    } 
    423438} 
    424439 
Note: See TracChangeset for help on using the changeset viewer.