Changeset 47122 for trunk/tests/phpunit/tests/mail.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/mail.php
r46586 r47122 102 102 wp_mail( $to, $subject, $message, $headers ); 103 103 104 // WordPress 3.2 and later correctly split the address into the two parts and send them sep erately to PHPMailer104 // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer. 105 105 // Earlier versions of PHPMailer were not touchy about the formatting of these arguments. 106 106 107 // retrieve the mailer instance107 // Retrieve the mailer instance. 108 108 $mailer = tests_retrieve_phpmailer_instance(); 109 109 $this->assertEquals( 'address@tld.com', $mailer->get_recipient( 'to' )->address ); … … 126 126 wp_mail( $to, $subject, $message ); 127 127 128 // WordPress 3.2 and later correctly split the address into the two parts and send them sep erately to PHPMailer128 // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer. 129 129 // Earlier versions of PHPMailer were not touchy about the formatting of these arguments. 130 130 $mailer = tests_retrieve_phpmailer_instance(); … … 168 168 */ 169 169 function test_wp_mail_return_value() { 170 // No errors 170 // No errors. 171 171 $this->assertTrue( wp_mail( 'valid@address.com', 'subject', 'body' ) ); 172 172 173 // Non-fatal errors 173 // Non-fatal errors. 174 174 $this->assertTrue( wp_mail( 'valid@address.com', 'subject', 'body', "Cc: invalid-address\nBcc: @invalid.address", ABSPATH . '/non-existant-file.html' ) ); 175 175 176 // Fatal errors 176 // Fatal errors. 177 177 $this->assertFalse( wp_mail( 'invalid.address', 'subject', 'body', '', array() ) ); 178 178 } … … 401 401 ); 402 402 403 // Retrieve the arguments passed to the 'wp_mail_failed' hook callbacks403 // Retrieve the arguments passed to the 'wp_mail_failed' hook callbacks. 404 404 $all_args = $ma->get_args(); 405 405 $call_args = array_pop( $all_args );
Note: See TracChangeset
for help on using the changeset viewer.