Changeset 49844 for trunk/tests/phpunit/tests/mail.php
- Timestamp:
- 12/20/2020 03:07:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/mail.php
r48937 r49844 416 416 $this->assertTrue( $phpmailer->validateAddress( 'foo@192.168.1.1' ), 'Assert PHPMailer accepts IP address email addresses' ); 417 417 } 418 419 /** 420 * Test for short-circuiting wp_mail(). 421 * 422 * @ticket 35069 423 */ 424 public function test_wp_mail_can_be_shortcircuited() { 425 $result1 = wp_mail( WP_TESTS_EMAIL, 'Foo', 'Bar' ); 426 427 add_filter( 'pre_wp_mail', '__return_false' ); 428 $result2 = wp_mail( WP_TESTS_EMAIL, 'Foo', 'Bar' ); 429 remove_filter( 'pre_wp_mail', '__return_false' ); 430 431 $this->assertTrue( $result1 ); 432 $this->assertFalse( $result2 ); 433 } 418 434 }
Note: See TracChangeset
for help on using the changeset viewer.