| 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 | } |