Ticket #23642: 23642-unit-tests.2.diff
File 23642-unit-tests.2.diff, 793 bytes (added by , 11 years ago) |
---|
-
trunk/tests/mail.php
210 210 $this->assertEquals($message . "\n", $GLOBALS['phpmailer']->mock_sent[0]['body']); 211 211 unset( $_SERVER['SERVER_NAME'] ); 212 212 } 213 214 /** 215 * @ticket 23642 216 */ 217 function test_wp_mail_return_value() { 218 // No errors 219 $this->assertTrue( wp_mail( 'valid@address.com', 'subject', 'body' ) ); 220 221 // Non-fatal errors 222 $this->assertTrue( wp_mail( 'valid@address.com', 'subject', 'body', "Cc: invalid-address\nBcc: @invalid.address", ABSPATH . '/non-existant-file.html' ) ); 223 224 // Fatal errors 225 $this->assertFalse( wp_mail( 'invalid.address', 'subject', 'body', '', array() ) ); 226 } 213 227 }