Changeset 52010 for trunk/tests/phpunit/tests/mail.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/mail.php
r51568 r52010 5 5 */ 6 6 class Tests_Mail extends WP_UnitTestCase { 7 function set_up() {7 public function set_up() { 8 8 parent::set_up(); 9 9 reset_phpmailer_instance(); 10 10 } 11 11 12 function tear_down() {12 public function tear_down() { 13 13 reset_phpmailer_instance(); 14 14 parent::tear_down(); … … 23 23 * back to 8bit in `MockPHPMailer::preSend`. 24 24 */ 25 function test_wp_mail_break_it() {25 public function test_wp_mail_break_it() { 26 26 $content = str_repeat( 'A', 1000 ); 27 27 $this->assertTrue( wp_mail( WP_TESTS_EMAIL, 'Looong line testing', $content ) ); 28 28 } 29 29 30 function test_wp_mail_custom_boundaries() {30 public function test_wp_mail_custom_boundaries() { 31 31 $to = 'user@example.com'; 32 32 $subject = 'Test email with custom boundaries'; … … 89 89 * @ticket 17305 90 90 */ 91 function test_wp_mail_rfc2822_addresses() {91 public function test_wp_mail_rfc2822_addresses() { 92 92 $to = 'Name <address@tld.com>'; 93 93 $from = 'Another Name <another_address@different-tld.com>'; … … 119 119 * @ticket 17305 120 120 */ 121 function test_wp_mail_multiple_rfc2822_to_addresses() {121 public function test_wp_mail_multiple_rfc2822_to_addresses() { 122 122 $to = 'Name <address@tld.com>, Another Name <another_address@different-tld.com>'; 123 123 $subject = 'RFC2822 Testing'; … … 136 136 } 137 137 138 function test_wp_mail_multiple_to_addresses() {138 public function test_wp_mail_multiple_to_addresses() { 139 139 $to = 'address@tld.com, another_address@different-tld.com'; 140 140 $subject = 'RFC2822 Testing'; … … 152 152 * @ticket 18463 153 153 */ 154 function test_wp_mail_to_address_no_name() {154 public function test_wp_mail_to_address_no_name() { 155 155 $to = '<address@tld.com>'; 156 156 $subject = 'RFC2822 Testing'; … … 167 167 * @ticket 23642 168 168 */ 169 function test_wp_mail_return_value() {169 public function test_wp_mail_return_value() { 170 170 // No errors. 171 171 $this->assertTrue( wp_mail( 'valid@address.com', 'subject', 'body' ) ); … … 290 290 } 291 291 292 function wp_mail_quoted_printable( $mailer ) {292 public function wp_mail_quoted_printable( $mailer ) { 293 293 $mailer->Encoding = 'quoted-printable'; 294 294 } 295 295 296 function wp_mail_set_text_message( $mailer ) {296 public function wp_mail_set_text_message( $mailer ) { 297 297 $mailer->AltBody = 'Wörld'; 298 298 } … … 310 310 * @ticket 28039 311 311 */ 312 function test_wp_mail_content_transfer_encoding_in_quoted_printable_multipart() {312 public function test_wp_mail_content_transfer_encoding_in_quoted_printable_multipart() { 313 313 add_action( 'phpmailer_init', array( $this, 'wp_mail_quoted_printable' ) ); 314 314 add_action( 'phpmailer_init', array( $this, 'wp_mail_set_text_message' ) ); … … 412 412 * @ticket 50720 413 413 */ 414 function test_phpmailer_validator() {414 public function test_phpmailer_validator() { 415 415 $phpmailer = $GLOBALS['phpmailer']; 416 416 $this->assertTrue( $phpmailer->validateAddress( 'foo@192.168.1.1' ), 'Assert PHPMailer accepts IP address email addresses' );
Note: See TracChangeset
for help on using the changeset viewer.