| | 213 | |
| | 214 | /** |
| | 215 | * @ticket 23642 |
| | 216 | */ |
| | 217 | function test_wp_mail_return_true_with_no_errors() { |
| | 218 | $result = wp_mail( 'valid@address.com', 'subject', 'body' ); |
| | 219 | $this->assertTrue( $result ); |
| | 220 | } |
| | 221 | |
| | 222 | /** |
| | 223 | * @ticket 23642 |
| | 224 | */ |
| | 225 | function test_wp_mail_return_true_with_non_fatal_errors() { |
| | 226 | $result = wp_mail( 'valid@address.com', 'subject', 'body', "Cc: invalid-address\nBcc: @invalid.address", ABSPATH . '/non-existant-file.html' ); |
| | 227 | $this->assertTrue( $result ); |
| | 228 | } |
| | 229 | |
| | 230 | /** |
| | 231 | * @ticket 23642 |
| | 232 | */ |
| | 233 | function test_wp_mail_return_false_for_fatal_errors() { |
| | 234 | $result = wp_mail( 'invalid.address', 'subject', 'body', '', array() ); |
| | 235 | $this->assertFalse( $result ); |
| | 236 | } |